home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.06 Jun 90 / WN⁄abC2txt
Unknown  |  1990-05-29  |  21.5 KB  |  [nX^d/nX^n]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default


id metadata
keyvalue
macFileType[nX^d]
macFileCreator[nX^n]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 04 00 54 a2 04 00 55 0a |........|..T...U.|
|00000010| 04 00 55 18 04 00 55 1a | 04 00 29 a6 00 03 28 5c |..U...U.|..)...(\|
|00000020| 00 03 28 60 00 03 28 64 | 00 03 28 4c 00 03 28 58 |..(`..(d|..(L..(X|
|00000030| 00 00 00 00 00 00 00 02 | 03 ae ff fd ff fd 00 00 |........|........|
|00000040| 09 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 01 07 01 ef 00 00 | 00 00 00 41 00 00 00 00 |........|...A....|
|00000060| 00 00 00 00 00 41 00 00 | 00 00 00 00 00 00 00 00 |.....A..|........|
|00000070| 00 00 00 00 00 00 01 01 | 02 64 00 00 00 48 00 48 |........|.d...H.H|
|00000080| 00 01 00 18 03 18 02 64 | 00 1f 00 1e 02 f9 02 46 |.......d|.......F|
|00000090| 00 64 00 00 00 00 04 00 | 2a 6e 00 08 00 59 00 94 |.d......|*n...Y..|
|000000a0| 00 0c 04 00 2a 6e 00 08 | 00 59 00 94 00 0c f1 17 |....*n..|.Y......|
|000000b0| 00 00 2b e4 00 00 00 00 | ff 00 00 00 00 00 00 00 |..+.....|........|
|000000c0| 56 2a 00 00 56 2a 00 00 | 56 2a 00 00 aa 28 00 00 |V*..V*..|V*...(..|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 04 00 2a 28 | 04 00 2a 60 04 00 29 a4 |......*(|..*`..).|
|00000110| 04 00 2a 20 04 00 29 a6 | 00 03 28 5c 00 03 28 60 |..* ..).|..(\..(`|
|00000120| 00 03 28 64 00 03 28 4c | 00 03 28 58 00 00 00 00 |..(d..(L|..(X....|
|00000130| 00 00 00 02 02 f2 ff fd | ff fd 00 00 09 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 14 00 00 01 1b |........|........|
|00000150| 01 ef 00 00 00 00 00 41 | 00 00 00 00 00 00 00 00 |.......A|........|
|00000160| 00 41 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.A......|........|
|00000170| 00 00 01 01 02 64 00 00 | 00 48 00 48 00 01 00 18 |.....d..|.H.H....|
|00000180| 03 18 02 64 00 1f 00 1e | 02 f9 02 46 00 64 00 00 |...d....|...F.d..|
|00000190| 00 00 04 00 02 00 00 08 | 00 59 00 59 00 10 04 00 |........|.Y.Y....|
|000001a0| 02 00 00 08 00 59 00 59 | 00 10 1a a2 00 00 00 46 |.....Y.Y|.......F|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 2a 6e 00 00 |........|....*n..|
|000001c0| 2a 6e 00 00 2a 6e 00 00 | aa 28 00 00 00 00 00 00 |*n..*n..|.(......|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 05 7b ff 00 03 0c 00 f7 | 4d 61 6e 61 67 69 6e 67 |.{......|Managing|
|00000210| 20 43 75 72 73 6f 72 73 | 0d 0d 42 6f 62 20 47 6f | Cursors|..Bob Go|
|00000220| 72 64 6f 6e 0d 0d 49 20 | 6b 6e 6f 77 20 68 6f 77 |rdon..I |know how|
|00000230| 20 74 6f 20 63 75 72 73 | 65 c9 0d 53 68 61 6b 65 | to curs|e..Shake|
|00000240| 73 70 65 61 72 65 2c 20 | 54 68 65 20 54 65 6d 70 |speare, |The Temp|
|00000250| 65 73 74 20 28 41 63 74 | 20 31 2c 20 53 63 65 6e |est (Act| 1, Scen|
|00000260| 65 20 32 29 0d 0d 49 66 | 20 79 6f 75 20 72 65 6d |e 2)..If| you rem|
|00000270| 65 6d 62 65 72 20 66 72 | 6f 6d 20 6c 61 73 74 20 |ember fr|om last |
|00000280| 74 69 6d 65 2c 20 49 20 | 68 61 64 20 69 6e 74 72 |time, I |had intr|
|00000290| 6f 64 75 63 65 64 20 74 | 68 65 20 69 64 65 61 20 |oduced t|he idea |
|000002a0| 6f 66 20 61 64 64 69 6e | 67 20 73 6f 6d 65 20 61 |of addin|g some a|
|000002b0| 64 64 69 74 69 6f 6e 61 | 6c 20 64 61 74 61 20 73 |dditiona|l data s|
|000002c0| 74 72 75 63 74 75 72 65 | 73 20 61 74 20 74 68 65 |tructure|s at the|
|000002d0| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 77 69 6e 64 | end of |the wind|
|000002e0| 6f 77 20 72 65 63 6f 72 | 64 20 74 6f 20 61 69 64 |ow recor|d to aid|
|000002f0| 20 69 6e 20 6b 65 65 70 | 69 6e 67 20 74 72 61 63 | in keep|ing trac|
|00000300| 6b 20 6f 66 20 74 68 65 | 20 64 61 74 61 20 74 68 |k of the| data th|
|00000310| 61 74 20 68 61 6e 67 73 | 20 61 72 6f 75 6e 64 20 |at hangs| around |
|00000320| 77 69 74 68 20 61 20 77 | 69 6e 64 6f 77 2e 20 41 |with a w|indow. A|
|00000330| 74 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 61 |t the en|d of tha|
|00000340| 74 20 61 72 74 69 63 6c | 65 20 49 20 73 61 69 64 |t articl|e I said|
|00000350| 20 77 65 20 77 6f 75 6c | 64 20 69 6c 6c 75 73 74 | we woul|d illust|
|00000360| 72 61 74 65 20 74 68 65 | 20 75 73 65 20 6f 66 20 |rate the| use of |
|00000370| 74 68 65 20 61 64 64 65 | 64 20 64 61 74 61 20 69 |the adde|d data i|
|00000380| 6e 20 6d 61 6e 61 67 69 | 6e 67 20 74 68 65 20 63 |n managi|ng the c|
|00000390| 75 72 73 6f 72 2e 20 57 | 65 20 77 69 6c 6c 20 63 |ursor. W|e will c|
|000003a0| 6f 76 65 72 20 74 68 61 | 74 2c 20 62 75 74 20 66 |over tha|t, but f|
|000003b0| 69 72 73 74 20 49 20 77 | 6f 75 6c 64 20 6c 69 6b |irst I w|ould lik|
|000003c0| 65 20 74 6f 20 63 6f 6d | 6d 65 6e 74 20 6f 6e 20 |e to com|ment on |
|000003d0| 61 20 6e 69 63 65 20 70 | 69 65 63 65 20 6f 66 20 |a nice p|iece of |
|000003e0| 77 6f 72 6b 20 62 79 20 | 4a 6f 68 6e 20 4e 61 69 |work by |John Nai|
|000003f0| 72 6e 20 69 6e 20 74 68 | 65 20 41 70 72 69 6c 20 |rn in th|e April |
|00000400| 69 73 73 75 65 2e 0d 0d | 4a 6f 68 6e 20 68 61 73 |issue...|John has|
|00000410| 20 70 72 65 73 65 6e 74 | 65 64 20 61 20 66 75 6c | present|ed a ful|
|00000420| 6c 2d 62 6c 6f 77 6e 20 | 53 63 72 6f 6c 6c 69 6e |l-blown |Scrollin|
|00000430| 67 20 4d 61 6e 61 67 65 | 72 20 74 6f 20 68 61 6e |g Manage|r to han|
|00000440| 64 6c 65 20 61 6c 6c 20 | 74 68 65 20 69 73 73 75 |dle all |the issu|
|00000450| 65 73 20 69 6e 76 6f 6c | 76 65 64 20 77 69 74 68 |es invol|ved with|
|00000460| 20 63 72 65 61 74 69 6e | 67 20 61 6e 64 20 6d 61 | creatin|g and ma|
|00000470| 69 6e 74 61 69 6e 69 6e | 67 20 73 63 72 6f 6c 6c |intainin|g scroll|
|00000480| 69 6e 67 20 77 69 6e 64 | 6f 77 73 2e 20 57 68 69 |ing wind|ows. Whi|
|00000490| 6c 65 20 74 68 65 72 65 | 20 61 72 65 20 61 20 6e |le there| are a n|
|000004a0| 75 6d 62 65 72 20 6f 66 | 20 64 69 66 66 65 72 65 |umber of| differe|
|000004b0| 6e 63 65 73 20 62 65 74 | 77 65 65 6e 20 77 68 61 |nces bet|ween wha|
|000004c0| 74 20 68 65 20 68 61 73 | 20 64 6f 6e 65 20 61 6e |t he has| done an|
|000004d0| 64 20 77 68 61 74 20 49 | 20 61 6d 20 64 65 73 63 |d what I| am desc|
|000004e0| 72 69 62 69 6e 67 20 69 | 6e 20 74 68 69 73 20 63 |ribing i|n this c|
|000004f0| 6f 6c 75 6d 6e 2c 20 61 | 20 63 6f 75 70 6c 65 20 |olumn, a| couple |
|00000500| 63 6f 6d 6d 6f 6e 20 70 | 6f 69 6e 74 73 20 61 72 |common p|oints ar|
|00000510| 65 20 77 6f 72 74 68 20 | 6d 65 6e 74 69 6f 6e 69 |e worth |mentioni|
|00000520| 6e 67 2e 20 46 69 72 73 | 74 2c 20 74 68 65 20 61 |ng. Firs|t, the a|
|00000530| 70 70 72 6f 61 63 68 20 | 69 73 20 74 6f 20 69 73 |pproach |is to is|
|00000540| 6f 6c 61 74 65 20 74 68 | 65 20 75 73 65 72 20 69 |olate th|e user i|
|00000550| 6e 74 65 72 66 61 63 65 | 20 63 6f 6e 74 72 6f 6c |nterface| control|
|00000560| 20 66 72 6f 6d 20 74 68 | 65 20 61 63 74 75 61 6c | from th|e actual|
|00000570| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 2e 20 54 68 | applica|tion. Th|
|00000580| 61 74 20 69 73 2c 20 61 | 73 20 6d 75 63 68 20 61 |at is, a|s much a|
|00000590| 73 20 70 6f 73 73 69 62 | 6c 65 2c 20 64 65 76 65 |s possib|le, deve|
|000005a0| 6c 6f 70 20 67 65 6e 65 | 72 69 63 20 63 6f 64 65 |lop gene|ric code|
|000005b0| 20 74 6f 20 68 61 6e 64 | 6c 65 20 74 68 65 20 62 | to hand|le the b|
|000005c0| 61 73 69 63 20 6f 70 65 | 72 61 74 69 6f 6e 20 6f |asic ope|ration o|
|000005d0| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 73 20 28 6f |f the wi|ndows (o|
|000005e0| 72 20 6d 65 6e 75 73 20 | 6f 72 20 64 69 61 6c 6f |r menus |or dialo|
|000005f0| 67 73 2c 20 66 6f 72 20 | 74 68 61 74 20 6d 61 74 |gs, for |that mat|
|00000600| 74 65 72 29 2e 20 53 65 | 63 6f 6e 64 2c 20 74 68 |ter). Se|cond, th|
|00000610| 69 73 20 67 65 6e 65 72 | 69 63 20 63 6f 64 65 20 |is gener|ic code |
|00000620| 77 69 6c 6c 20 70 72 6f | 62 61 62 6c 79 20 72 65 |will pro|bably re|
|00000630| 71 75 69 72 65 20 73 6f | 6d 65 20 70 6c 61 63 65 |quire so|me place|
|00000640| 20 74 6f 20 6b 65 65 70 | 20 74 68 65 20 69 6e 66 | to keep| the inf|
|00000650| 6f 72 6d 61 74 69 6f 6e | 20 69 74 20 75 73 65 73 |ormation| it uses|
|00000660| 3b 20 64 65 76 65 6c 6f | 70 20 61 20 64 61 74 61 |; develo|p a data|
|00000670| 20 73 74 72 75 63 74 75 | 72 65 20 74 6f 20 68 6f | structu|re to ho|
|00000680| 6c 64 20 74 68 69 73 2c | 20 61 6e 64 20 61 74 74 |ld this,| and att|
|00000690| 61 63 68 20 69 74 20 69 | 6e 20 73 6f 6d 65 20 77 |ach it i|n some w|
|000006a0| 61 79 20 74 6f 20 74 68 | 65 20 77 69 6e 64 6f 77 |ay to th|e window|
|000006b0| 20 28 6f 72 20 6d 65 6e | 75 20 6f 72 20 64 69 61 | (or men|u or dia|
|000006c0| 6c 6f 67 29 2e 20 54 68 | 65 72 65 20 69 73 20 61 |log). Th|ere is a|
|000006d0| 63 74 75 61 6c 6c 79 20 | 61 20 62 69 74 20 6d 6f |ctually |a bit mo|
|000006e0| 72 65 20 63 6f 6d 6d 6f | 6e 61 6c 69 74 79 20 28 |re commo|nality (|
|000006f0| 49 20 68 61 76 65 20 74 | 68 65 20 61 64 76 61 6e |I have t|he advan|
|00000700| 74 61 67 65 20 6f 66 20 | 62 65 69 6e 67 20 61 62 |tage of |being ab|
|00000710| 6c 65 20 74 6f 20 73 65 | 65 20 74 68 65 20 70 61 |le to se|e the pa|
|00000720| 72 74 73 20 49 20 68 61 | 76 65 20 77 72 69 74 74 |rts I ha|ve writt|
|00000730| 65 6e 20 62 75 74 20 6e | 6f 74 20 79 65 74 20 70 |en but n|ot yet p|
|00000740| 75 62 6c 69 73 68 65 64 | 29 2c 20 61 6e 64 20 77 |ublished|), and w|
|00000750| 65 20 77 69 6c 6c 20 65 | 78 70 6c 6f 72 65 20 6f |e will e|xplore o|
|00000760| 6e 65 20 6f 66 20 74 68 | 6f 73 65 20 69 6e 20 74 |ne of th|ose in t|
|00000770| 68 69 73 20 61 72 74 69 | 63 6c 65 2e 0d 05 69 ff |his arti|cle...i.|
|00000780| 00 03 0c 00 f7 0d 4f 6e | 65 20 70 6f 69 6e 74 20 |......On|e point |
|00000790| 6f 66 20 64 69 66 66 65 | 72 65 6e 63 65 2e 20 4a |of diffe|rence. J|
|000007a0| 6f 68 6e 20 75 73 65 73 | 20 74 68 65 20 77 69 6e |ohn uses| the win|
|000007b0| 64 6f 77 d5 73 20 72 65 | 66 43 6f 6e 20 74 6f 20 |dow.s re|fCon to |
|000007c0| 68 6f 6c 64 20 68 69 73 | 20 61 64 64 69 74 69 6f |hold his| additio|
|000007d0| 6e 61 6c 20 64 61 74 61 | 20 73 74 72 75 63 74 75 |nal data| structu|
|000007e0| 72 65 2e 20 48 69 73 20 | 6e 65 77 20 64 61 74 61 |re. His |new data|
|000007f0| 20 73 74 72 75 63 74 75 | 72 65 20 69 6e 63 6c 75 | structu|re inclu|
|00000800| 64 65 73 20 69 74 73 20 | 6f 77 6e 20 72 65 66 43 |des its |own refC|
|00000810| 6f 6e 20 66 6f 72 20 74 | 68 65 20 77 69 6e 64 6f |on for t|he windo|
|00000820| 77 d5 73 20 63 6f 6e 74 | 65 6e 74 73 2e 20 49 20 |w.s cont|ents. I |
|00000830| 61 64 64 65 64 20 74 68 | 65 20 64 61 74 61 20 6f |added th|e data o|
|00000840| 6e 20 74 6f 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |n to the| end of |
|00000850| 74 68 65 20 77 69 6e 64 | 6f 77 d5 73 20 73 74 72 |the wind|ow.s str|
|00000860| 75 63 74 75 72 65 20 69 | 74 73 65 6c 66 2e 20 49 |ucture i|tself. I|
|00000870| 20 66 65 65 6c 20 74 68 | 69 73 20 73 69 6d 70 6c | feel th|is simpl|
|00000880| 69 66 69 65 73 20 74 68 | 69 6e 67 73 20 73 6f 6d |ifies th|ings som|
|00000890| 65 77 68 61 74 2c 20 61 | 6e 64 20 61 74 20 6c 65 |ewhat, a|nd at le|
|000008a0| 61 73 74 20 66 6f 72 20 | 6e 6f 77 20 69 74 20 64 |ast for |now it d|
|000008b0| 6f 65 73 20 6e 6f 74 20 | 73 65 65 6d 20 74 6f 20 |oes not |seem to |
|000008c0| 76 69 6f 6c 61 74 65 20 | 61 6e 79 20 72 75 6c 65 |violate |any rule|
|000008d0| 73 2e 20 49 66 20 79 6f | 75 20 6c 69 6b 65 64 20 |s. If yo|u liked |
|000008e0| 4a 6f 68 6e d5 73 20 61 | 72 74 69 63 6c 65 20 61 |John.s a|rticle a|
|000008f0| 73 20 49 20 64 69 64 2c | 20 79 6f 75 20 63 65 72 |s I did,| you cer|
|00000900| 74 61 69 6e 6c 79 20 68 | 61 76 65 20 6d 79 20 70 |tainly h|ave my p|
|00000910| 65 72 6d 69 73 73 69 6f | 6e 20 74 6f 20 75 73 65 |ermissio|n to use|
|00000920| 20 74 68 65 20 74 65 63 | 68 6e 69 71 75 65 20 49 | the tec|hnique I|
|00000930| d5 76 65 20 6f 75 74 6c | 69 6e 65 64 20 69 6e 20 |.ve outl|ined in |
|00000940| 69 6d 70 6c 65 6d 65 6e | 74 69 6e 67 20 69 74 2e |implemen|ting it.|
|00000950| 20 57 68 69 6c 65 20 49 | 20 68 61 76 65 6e d5 74 | While I| haven.t|
|00000960| 20 6d 65 74 20 4a 6f 68 | 6e 2c 20 49 d5 6d 20 72 | met Joh|n, I.m r|
|00000970| 65 61 73 6f 6e 61 62 6c | 79 20 73 75 72 65 20 68 |easonabl|y sure h|
|00000980| 65 20 77 6f 6e d5 74 20 | 6d 69 6e 64 2e 0d 0d 43 |e won.t |mind...C|
|00000990| 75 72 73 6f 72 73 0d 0d | 54 68 65 20 63 75 72 73 |ursors..|The curs|
|000009a0| 6f 72 20 61 74 74 61 63 | 68 65 64 20 74 6f 20 74 |or attac|hed to t|
|000009b0| 68 65 20 6d 6f 75 73 65 | 20 63 68 61 6e 67 65 73 |he mouse| changes|
|000009c0| 20 69 74 73 20 73 68 61 | 70 65 20 61 73 20 79 6f | its sha|pe as yo|
|000009d0| 75 20 6d 6f 76 65 20 74 | 68 65 20 6d 6f 75 73 65 |u move t|he mouse|
|000009e0| 20 61 72 6f 75 6e 64 20 | 74 68 65 20 73 63 72 65 | around |the scre|
|000009f0| 65 6e 2e 20 49 6e 20 61 | 64 64 69 74 69 6f 6e 2c |en. In a|ddition,|
|00000a00| 20 74 68 65 20 75 73 65 | 72 20 63 61 6e 20 6f 66 | the use|r can of|
|00000a10| 74 65 6e 20 61 66 66 65 | 63 74 20 69 74 73 20 73 |ten affe|ct its s|
|00000a20| 68 61 70 65 20 64 69 72 | 65 63 74 6c 79 20 62 79 |hape dir|ectly by|
|00000a30| 20 73 65 6c 65 63 74 69 | 6e 67 20 61 20 74 6f 6f | selecti|ng a too|
|00000a40| 6c 20 66 72 6f 6d 20 61 | 20 74 6f 6f 6c 62 6f 78 |l from a| toolbox|
|00000a50| 20 28 75 73 75 61 6c 6c | 79 20 66 6f 75 6e 64 20 | (usuall|y found |
|00000a60| 69 6e 20 67 72 61 70 68 | 69 63 73 20 6f 72 20 70 |in graph|ics or p|
|00000a70| 61 67 65 20 6c 61 79 6f | 75 74 20 61 70 70 6c 69 |age layo|ut appli|
|00000a80| 63 61 74 69 6f 6e 73 29 | 2e 20 54 68 65 20 70 72 |cations)|. The pr|
|00000a90| 6f 62 6c 65 6d 20 77 65 | 20 64 65 61 6c 20 77 69 |oblem we| deal wi|
|00000aa0| 74 68 20 74 68 69 73 20 | 6d 6f 6e 74 68 20 69 73 |th this |month is|
|00000ab0| 20 68 6f 77 20 74 6f 20 | 6d 61 6e 61 67 65 20 74 | how to |manage t|
|00000ac0| 68 65 20 63 75 72 73 6f | 72 20 73 6f 20 69 74 20 |he curso|r so it |
|00000ad0| 69 73 20 68 61 6e 64 6c | 65 64 20 61 73 20 61 75 |is handl|ed as au|
|00000ae0| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 61 73 20 70 |tomatica|lly as p|
|00000af0| 6f 73 73 69 62 6c 65 2e | 0d 0d 54 68 65 20 66 69 |ossible.|..The fi|
|00000b00| 72 73 74 20 69 73 73 75 | 65 20 69 73 20 67 65 74 |rst issu|e is get|
|00000b10| 74 69 6e 67 20 63 75 72 | 73 6f 72 73 2e 20 54 68 |ting cur|sors. Th|
|00000b20| 65 72 65 20 61 72 65 20 | 66 69 76 65 20 62 75 69 |ere are |five bui|
|00000b30| 6c 74 20 69 6e 20 74 6f | 20 74 68 65 20 4d 61 63 |lt in to| the Mac|
|00000b40| 3a 20 61 72 72 6f 77 2c | 20 63 72 6f 73 73 68 61 |: arrow,| crossha|
|00000b50| 69 72 73 2c 20 70 6c 75 | 73 2c 20 63 6c 6f 63 6b |irs, plu|s, clock|
|00000b60| 2c 20 69 2d 62 65 61 6d | 2e 20 59 6f 75 20 63 61 |, i-beam|. You ca|
|00000b70| 6e 20 61 6c 73 6f 20 6d | 61 6b 65 20 79 6f 75 72 |n also m|ake your|
|00000b80| 20 6f 77 6e 20 77 69 74 | 68 20 52 65 73 45 64 69 | own wit|h ResEdi|
|00000b90| 74 20 6f 72 20 73 6f 6d | 65 20 6f 74 68 65 72 20 |t or som|e other |
|00000ba0| 72 65 73 6f 75 72 63 65 | 20 74 6f 6f 6c 2e 20 4f |resource| tool. O|
|00000bb0| 6e 63 65 20 77 65 20 68 | 61 76 65 20 64 65 63 69 |nce we h|ave deci|
|00000bc0| 64 65 64 20 74 68 65 20 | 63 75 72 73 6f 72 73 20 |ded the |cursors |
|00000bd0| 74 6f 20 75 73 65 20 28 | 61 6e 64 20 6d 61 64 65 |to use (|and made|
|00000be0| 20 74 68 65 69 72 20 72 | 65 73 6f 75 72 63 65 73 | their r|esources|
|00000bf0| 29 2c 20 77 65 20 6e 65 | 65 64 20 74 6f 20 63 6f |), we ne|ed to co|
|00000c00| 6e 74 72 6f 6c 20 74 68 | 65 20 61 70 70 65 61 72 |ntrol th|e appear|
|00000c10| 61 6e 63 65 20 6f 6e 20 | 74 68 65 20 73 63 72 65 |ance on |the scre|
|00000c20| 65 6e 2e 20 57 68 61 74 | 20 49 20 77 69 6c 6c 20 |en. What| I will |
|00000c30| 64 65 73 63 72 69 62 65 | 20 74 68 69 73 20 6d 6f |describe| this mo|
|00000c40| 6e 74 68 20 69 73 20 6f | 6e 65 20 77 61 79 20 74 |nth is o|ne way t|
|00000c50| 6f 20 6d 61 6e 61 67 65 | 20 74 68 65 20 63 68 61 |o manage| the cha|
|00000c60| 6e 67 65 20 6f 66 20 63 | 75 72 73 6f 72 20 73 68 |nge of c|ursor sh|
|00000c70| 61 70 65 20 61 73 20 74 | 68 65 20 75 73 65 72 20 |ape as t|he user |
|00000c80| 6d 6f 76 65 73 20 74 68 | 65 20 6d 6f 75 73 65 20 |moves th|e mouse |
|00000c90| 61 72 6f 75 6e 64 20 74 | 68 65 20 73 63 72 65 65 |around t|he scree|
|00000ca0| 6e 2e 20 49 20 61 6d 20 | 6e 6f 74 20 63 6f 76 65 |n. I am |not cove|
|00000cb0| 72 69 6e 67 20 74 68 65 | 20 73 65 74 74 69 6e 67 |ring the| setting|
|00000cc0| 20 6f 66 20 74 68 65 20 | 63 75 72 73 6f 72 d5 73 | of the |cursor.s|
|00000cd0| 20 76 69 61 20 74 6f 6f | 6c 20 62 6f 78 20 6f 72 | via too|l box or|
|00000ce0| 20 6d 65 6e 75 73 2e 0d | 06 64 ff 00 03 0c 00 f7 | menus..|.d......|
|00000cf0| 0d 49 6e 20 4a 75 6e 65 | 20 49 20 73 75 67 67 65 |.In June| I sugge|
|00000d00| 73 74 65 64 20 74 68 65 | 20 75 73 65 20 6f 66 20 |sted the| use of |
|00000d10| 77 69 6e 64 6f 77 20 6d | 61 72 67 69 6e 73 2e 20 |window m|argins. |
|00000d20| 54 68 65 20 77 69 6e 64 | 6f 77 20 6d 61 72 67 69 |The wind|ow margi|
|00000d30| 6e 20 69 73 20 74 68 61 | 74 20 61 72 65 61 20 62 |n is tha|t area b|
|00000d40| 65 74 77 65 65 6e 20 74 | 68 65 20 77 69 6e 64 6f |etween t|he windo|
|00000d50| 77 d5 73 20 66 72 61 6d | 65 2c 20 77 68 69 63 68 |w.s fram|e, which|
|00000d60| 20 69 73 20 68 61 6e 64 | 6c 65 64 20 62 79 20 74 | is hand|led by t|
|00000d70| 68 65 20 4d 61 63 69 6e | 74 6f 73 68 20 74 6f 6f |he Macin|tosh too|
|00000d80| 6c 62 6f 78 20 72 6f 75 | 74 69 6e 65 73 2c 20 61 |lbox rou|tines, a|
|00000d90| 6e 64 20 74 68 65 20 77 | 69 6e 64 6f 77 d5 73 20 |nd the w|indow.s |
|00000da0| 61 63 74 75 61 6c 20 63 | 6f 6e 74 65 6e 74 73 2c |actual c|ontents,|
|00000db0| 20 77 68 69 63 68 20 69 | 73 20 77 68 61 74 20 79 | which i|s what y|
|00000dc0| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|00000dd0| 69 73 20 61 62 6f 75 74 | 2e 20 54 68 65 20 6f 62 |is about|. The ob|
|00000de0| 6a 65 63 74 73 20 74 68 | 61 74 20 6d 69 67 68 74 |jects th|at might|
|00000df0| 20 62 65 20 69 6e 20 61 | 20 77 69 6e 64 6f 77 20 | be in a| window |
|00000e00| 6d 61 72 67 69 6e 20 69 | 6e 63 6c 75 64 65 20 73 |margin i|nclude s|
|00000e10| 63 72 6f 6c 6c 20 62 61 | 72 73 2c 20 72 75 6c 65 |croll ba|rs, rule|
|00000e20| 72 73 2c 20 61 6e 64 20 | 74 6f 6f 6c 20 62 6f 78 |rs, and |tool box|
|00000e30| 65 73 2e 20 54 68 65 73 | 65 20 61 72 65 20 73 75 |es. Thes|e are su|
|00000e40| 63 68 20 63 6f 6d 6d 6f | 6e 20 63 6f 6d 70 6f 6e |ch commo|n compon|
|00000e50| 65 6e 74 73 20 6f 66 20 | 77 69 6e 64 6f 77 73 20 |ents of |windows |
|00000e60| 74 68 61 74 20 74 68 65 | 79 20 63 61 6e 20 62 65 |that the|y can be|
|00000e70| 20 68 61 6e 64 6c 65 64 | 20 62 79 20 67 65 6e 65 | handled| by gene|
|00000e80| 72 69 63 20 63 6f 64 65 | 20 61 70 61 72 74 20 66 |ric code| apart f|
|00000e90| 72 6f 6d 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |rom your| applica|
|00000ea0| 74 69 6f 6e 2e 20 54 68 | 65 20 6f 74 68 65 72 20 |tion. Th|e other |
|00000eb0| 70 72 6f 70 65 72 74 79 | 20 6f 66 20 74 68 65 20 |property| of the |
|00000ec0| 77 69 6e 64 6f 77 20 6d | 61 72 67 69 6e 20 69 73 |window m|argin is|
|00000ed0| 20 74 68 61 74 20 74 68 | 65 20 63 75 72 73 6f 72 | that th|e cursor|
|00000ee0| 20 74 79 70 69 63 61 6c | 6c 79 20 63 68 61 6e 67 | typical|ly chang|
|00000ef0| 65 73 20 69 6e 74 6f 20 | 74 68 65 20 61 72 72 6f |es into |the arro|
|00000f00| 77 20 61 73 20 69 74 20 | 69 73 20 6d 6f 76 65 64 |w as it |is moved|
|00000f10| 20 69 6e 74 6f 20 74 68 | 65 20 73 63 72 6f 6c 6c | into th|e scroll|
|00000f20| 20 62 61 72 2c 20 72 75 | 6c 65 72 2c 20 65 74 63 | bar, ru|ler, etc|
|00000f30| 2e 0d 0d 43 75 72 73 6f | 72 68 65 6c 70 0d 0d 43 |...Curso|rhelp..C|
|00000f40| 75 72 73 6f 72 68 65 6c | 70 20 63 6f 6e 73 69 73 |ursorhel|p consis|
|00000f50| 74 73 20 6f 66 20 74 68 | 72 65 65 20 66 75 6e 63 |ts of th|ree func|
|00000f60| 74 69 6f 6e 73 20 61 6e | 64 20 61 6e 20 69 6e 63 |tions an|d an inc|
|00000f70| 6c 75 64 65 20 66 69 6c | 65 20 74 6f 20 61 69 64 |lude fil|e to aid|
|00000f80| 20 69 6e 20 74 68 65 20 | 73 65 74 74 69 6e 67 20 | in the |setting |
|00000f90| 61 6e 64 20 61 75 74 6f | 6d 61 74 69 63 20 63 68 |and auto|matic ch|
|00000fa0| 61 6e 67 69 6e 67 20 6f | 66 20 63 75 72 73 6f 72 |anging o|f cursor|
|00000fb0| 73 2e 20 54 68 65 73 65 | 20 66 75 6e 63 74 69 6f |s. These| functio|
|00000fc0| 6e 73 20 61 73 73 75 6d | 65 20 74 68 65 20 77 69 |ns assum|e the wi|
|00000fd0| 6e 64 6f 77 20 73 74 72 | 75 63 74 75 72 65 20 64 |ndow str|ucture d|
|00000fe0| 65 73 63 72 69 62 65 64 | 20 69 6e 20 4a 75 6e 65 |escribed| in June|
|00000ff0| 2e 20 54 68 65 20 77 69 | 6e 64 6f 77 20 6d 61 72 |. The wi|ndow mar|
|00001000| 67 69 6e 73 20 28 6d 74 | 6f 70 2c 6d 62 6f 74 74 |gins (mt|op,mbott|
|00001010| 6f 6d 2c 20 6d 72 69 67 | 68 74 2c 20 6d 6c 65 66 |om, mrig|ht, mlef|
|00001020| 74 29 20 61 72 65 20 73 | 74 6f 72 65 64 20 77 69 |t) are s|tored wi|
|00001030| 74 68 20 74 68 65 20 77 | 69 6e 64 6f 77 2e 20 4d |th the w|indow. M|
|00001040| 6f 72 65 20 69 6d 70 6f | 72 74 61 6e 74 6c 79 2c |ore impo|rtantly,|
|00001050| 20 74 68 65 20 72 65 63 | 74 61 6e 67 6c 65 20 74 | the rec|tangle t|
|00001060| 68 61 74 20 73 75 72 72 | 6f 75 6e 64 73 20 74 68 |hat surr|ounds th|
|00001070| 65 20 61 63 74 75 61 6c | 20 77 69 6e 64 6f 77 20 |e actual| window |
|00001080| 63 6f 6e 74 65 6e 74 73 | 20 28 63 75 72 73 72 74 |contents| (cursrt|
|00001090| 29 20 69 73 20 61 6c 73 | 6f 20 73 74 6f 72 65 64 |) is als|o stored|
|000010a0| 20 28 49 20 61 73 73 75 | 6d 65 20 72 65 63 74 61 | (I assu|me recta|
|000010b0| 6e 67 75 6c 61 72 20 77 | 69 6e 64 6f 77 73 29 2e |ngular w|indows).|
|000010c0| 20 54 68 69 73 20 72 65 | 63 74 61 6e 67 6c 65 20 | This re|ctangle |
|000010d0| 69 73 20 74 68 65 20 61 | 72 65 61 20 69 6e 20 77 |is the a|rea in w|
|000010e0| 68 69 63 68 20 74 68 65 | 20 63 75 72 73 6f 72 20 |hich the| cursor |
|000010f0| 69 73 20 74 68 65 20 73 | 68 61 70 65 20 74 68 65 |is the s|hape the|
|00001100| 20 75 73 65 72 20 73 65 | 6c 65 63 74 65 64 20 28 | user se|lected (|
|00001110| 69 20 62 65 61 6d 2c 20 | 63 72 6f 73 73 2c 20 65 |i beam, |cross, e|
|00001120| 74 63 2e 29 2e 20 49 20 | 70 75 74 20 69 74 20 69 |tc.). I |put it i|
|00001130| 6e 20 74 68 65 20 77 69 | 6e 64 6f 77 20 73 74 72 |n the wi|ndow str|
|00001140| 75 63 74 75 72 65 20 73 | 69 6d 70 6c 79 20 74 6f |ucture s|imply to|
|00001150| 20 61 76 6f 69 64 20 68 | 61 76 69 6e 67 20 74 6f | avoid h|aving to|
|00001160| 20 63 61 6c 63 75 6c 61 | 74 65 20 69 74 20 65 61 | calcula|te it ea|
|00001170| 63 68 20 74 69 6d 65 2e | 20 54 68 65 20 66 69 6e |ch time.| The fin|
|00001180| 61 6c 20 70 69 65 63 65 | 20 69 73 20 74 68 65 20 |al piece| is the |
|00001190| 63 75 72 73 6f 72 20 69 | 74 73 65 6c 66 20 28 6d |cursor i|tself (m|
|000011a0| 6f 75 73 65 72 29 2e 20 | 54 68 61 74 20 69 73 2c |ouser). |That is,|
|000011b0| 20 74 68 65 20 63 75 72 | 73 6f 72 d5 73 20 73 68 | the cur|sor.s sh|
|000011c0| 61 70 65 20 61 73 20 73 | 65 6c 65 63 74 65 64 20 |ape as s|elected |
|000011d0| 62 79 20 74 68 65 20 75 | 73 65 72 20 69 73 20 61 |by the u|ser is a|
|000011e0| 20 70 72 6f 70 65 72 74 | 79 20 6f 66 20 74 68 65 | propert|y of the|
|000011f0| 20 77 69 6e 64 6f 77 2e | 20 57 69 74 68 20 61 20 | window.| With a |
|00001200| 6d 75 6c 74 69 2d 77 69 | 6e 64 6f 77 20 61 70 70 |multi-wi|ndow app|
|00001210| 6c 69 63 61 74 69 6f 6e | 20 74 68 65 20 75 73 65 |lication| the use|
|00001220| 72 20 63 61 6e 20 68 61 | 76 65 20 6f 6e 65 20 77 |r can ha|ve one w|
|00001230| 69 6e 64 6f 77 20 65 64 | 69 74 69 6e 67 20 74 65 |indow ed|iting te|
|00001240| 78 74 2c 20 61 6e 6f 74 | 68 65 72 20 65 64 69 74 |xt, anot|her edit|
|00001250| 69 6e 67 20 61 20 67 72 | 61 70 68 69 63 2c 20 61 |ing a gr|aphic, a|
|00001260| 6e 64 20 61 20 74 68 69 | 72 64 20 65 64 69 74 69 |nd a thi|rd editi|
|00001270| 6e 67 20 61 20 73 70 72 | 65 61 64 73 68 65 65 74 |ng a spr|eadsheet|
|00001280| 20 28 49 20 61 6d 20 6e | 6f 74 20 73 75 67 67 65 | (I am n|ot sugge|
|00001290| 73 74 69 6e 67 20 61 6e | 79 6f 6e 65 20 61 63 74 |sting an|yone act|
|000012a0| 75 61 6c 6c 79 20 77 72 | 69 74 65 20 73 6f 6d 65 |ually wr|ite some|
|000012b0| 74 68 69 6e 67 20 6c 69 | 6b 65 20 74 68 69 73 29 |thing li|ke this)|
|000012c0| 2c 20 61 6e 64 20 74 68 | 65 20 61 70 70 72 6f 70 |, and th|e approp|
|000012d0| 72 69 61 74 65 20 63 75 | 72 73 6f 72 20 77 69 6c |riate cu|rsor wil|
|000012e0| 6c 20 62 65 20 64 69 73 | 70 6c 61 79 65 64 20 61 |l be dis|played a|
|000012f0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 61 73 20 |utomatic|ally as |
|00001300| 74 68 65 20 75 73 65 72 | 20 73 65 6c 65 63 74 73 |the user| selects|
|00001310| 20 65 61 63 68 20 77 69 | 6e 64 6f 77 2e 20 54 68 | each wi|ndow. Th|
|00001320| 65 20 6d 61 69 6e 20 6c | 6f 6f 70 20 6e 65 65 64 |e main l|oop need|
|00001330| 20 6b 6e 6f 77 20 6e 6f | 74 68 69 6e 67 20 6f 66 | know no|thing of|
|00001340| 20 74 68 65 20 63 75 72 | 73 6f 72 73 2e 0d 03 e2 | the cur|sors....|
|00001350| ff 00 03 0c 00 f7 0d 54 | 68 65 20 6d 61 69 6e 20 |.......T|he main |
|00001360| 6c 6f 6f 70 20 64 6f 65 | 73 20 6e 65 65 64 20 74 |loop doe|s need t|
|00001370| 6f 20 73 65 74 20 74 68 | 65 20 63 75 72 73 6f 72 |o set th|e cursor|
|00001380| 2e 20 54 68 65 72 65 20 | 61 72 65 20 74 77 6f 20 |. There |are two |
|00001390| 70 6c 61 63 65 73 20 77 | 68 65 72 65 20 74 68 69 |places w|here thi|
|000013a0| 73 20 63 61 6e 20 6f 63 | 63 75 72 3a 20 74 68 65 |s can oc|cur: the|
|000013b0| 20 75 73 65 72 73 20 73 | 70 65 63 69 66 69 65 73 | users s|pecifies|
|000013c0| 20 61 20 63 75 72 73 6f | 72 20 69 6e 20 73 6f 6d | a curso|r in som|
|000013d0| 65 20 77 61 79 20 6f 72 | 2c 20 74 68 65 20 61 70 |e way or|, the ap|
|000013e0| 70 6c 69 63 61 74 69 6f | 6e 20 64 69 73 70 6c 61 |plicatio|n displa|
|000013f0| 79 73 20 74 68 65 20 77 | 61 74 63 68 20 28 6f 72 |ys the w|atch (or|
|00001400| 20 6f 74 68 65 72 20 69 | 6e 64 69 63 61 74 6f 72 | other i|ndicator|
|00001410| 29 20 74 6f 20 69 6e 64 | 69 63 61 74 65 20 74 68 |) to ind|icate th|
|00001420| 65 20 70 61 73 73 61 67 | 65 20 6f 66 20 74 69 6d |e passag|e of tim|
|00001430| 65 2e 20 54 68 65 20 70 | 72 6f 67 72 61 6d 20 63 |e. The p|rogram c|
|00001440| 61 6c 6c 73 20 43 75 72 | 73 6f 72 54 6f 55 73 65 |alls Cur|sorToUse|
|00001450| 20 70 61 73 73 69 6e 67 | 20 74 68 65 20 77 69 6e | passing| the win|
|00001460| 64 6f 77 20 61 6e 64 20 | 74 68 65 20 6e 75 6d 62 |dow and |the numb|
|00001470| 65 72 20 6f 66 20 74 68 | 65 20 64 65 73 69 72 65 |er of th|e desire|
|00001480| 64 20 63 75 72 73 6f 72 | 2e 0d 0d 54 68 65 20 70 |d cursor|...The p|
|00001490| 72 6f 67 72 61 6d 20 61 | 6c 73 6f 20 6e 65 65 64 |rogram a|lso need|
|000014a0| 73 20 74 6f 20 73 65 74 | 20 74 68 65 20 63 75 72 |s to set| the cur|
|000014b0| 73 6f 72 20 72 65 63 74 | 61 6e 67 6c 65 2e 20 54 |sor rect|angle. T|
|000014c0| 68 69 73 20 6d 75 73 74 | 20 62 65 20 64 6f 6e 65 |his must| be done|
|000014d0| 20 65 76 65 72 79 20 74 | 69 6d 65 20 74 68 65 20 | every t|ime the |
|000014e0| 77 69 6e 64 6f 77 d5 73 | 20 73 69 7a 65 20 69 73 |window.s| size is|
|000014f0| 20 63 68 61 6e 67 65 64 | 20 6f 72 20 74 68 65 20 | changed| or the |
|00001500| 77 69 6e 64 6f 77 20 6d | 61 72 67 69 6e 73 20 61 |window m|argins a|
|00001510| 72 65 20 63 68 61 6e 67 | 65 64 20 28 66 6f 72 20 |re chang|ed (for |
|00001520| 65 78 61 6d 70 6c 65 2c | 20 63 68 6f 6f 73 69 6e |example,| choosin|
|00001530| 67 20 74 6f 20 73 68 6f | 77 20 72 75 6c 65 72 73 |g to sho|w rulers|
|00001540| 20 6f 72 20 6e 6f 74 29 | 2e 41 20 63 61 6c 6c 20 | or not)|.A call |
|00001550| 74 6f 20 43 75 72 73 6f | 72 52 65 63 74 28 29 20 |to Curso|rRect() |
|00001560| 64 6f 65 73 20 74 68 61 | 74 2e 20 4e 6f 74 65 20 |does tha|t. Note |
|00001570| 74 68 61 74 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |that the| window |
|00001580| 6d 61 72 67 69 6e 73 20 | 6d 75 73 74 20 68 61 76 |margins |must hav|
|00001590| 65 20 62 65 65 6e 20 70 | 72 65 76 69 6f 75 73 6c |e been p|reviousl|
|000015a0| 79 20 73 65 74 2e 0d 0d | 54 6f 20 61 63 74 75 61 |y set...|To actua|
|000015b0| 6c 6c 79 20 63 6f 6e 74 | 72 6f 6c 20 74 68 65 20 |lly cont|rol the |
|000015c0| 63 75 72 73 6f 72 2c 20 | 74 68 65 20 70 72 6f 67 |cursor, |the prog|
|000015d0| 72 61 6d 20 63 61 6c 6c | 73 20 43 75 72 73 6f 72 |ram call|s Cursor|
|000015e0| 4d 61 69 6e 74 61 69 6e | 28 29 20 61 73 20 69 74 |Maintain|() as it|
|000015f0| 20 72 75 6e 73 20 74 68 | 72 6f 75 67 68 20 74 68 | runs th|rough th|
|00001600| 65 20 65 76 65 6e 74 20 | 6c 6f 6f 70 2e 0d 0d 49 |e event |loop...I|
|00001610| 6e 63 6c 75 64 65 20 46 | 69 6c 65 73 0d 0d 2f 2a |nclude F|iles../*|
|00001620| 77 69 6e 64 6f 77 68 65 | 6c 70 2e 68 20 2a 2f 0d |windowhe|lp.h */.|
|00001630| 23 69 6e 63 6c 75 64 65 | 20 22 54 65 78 74 45 64 |#include| "TextEd|
|00001640| 69 74 2e 68 22 0d 09 0d | 23 69 66 6e 64 65 66 20 |it.h"...|#ifndef |
|00001650| 57 49 4e 44 4f 57 48 45 | 4c 50 5f 48 0d 23 64 65 |WINDOWHE|LP_H.#de|
|00001660| 66 69 6e 65 20 57 49 4e | 44 4f 57 48 45 4c 50 5f |fine WIN|DOWHELP_|
|00001670| 48 0d 23 69 6e 63 6c 75 | 64 65 09 22 61 62 63 2e |H.#inclu|de."abc.|
|00001680| 68 22 20 20 20 20 2f 2a | 20 77 69 6e 64 6f 77 20 |h" /*| window |
|00001690| 61 64 64 2d 6f 6e 20 73 | 74 72 75 63 74 75 72 65 |add-on s|tructure|
|000016a0| 20 2a 2f 0d 0d 23 64 65 | 66 69 6e 65 09 57 69 6e | */..#de|fine.Win|
|000016b0| 64 6f 77 53 74 72 75 63 | 74 09 73 74 72 75 63 74 |dowStruc|t.struct|
|000016c0| 20 77 5f 73 74 72 75 63 | 74 0d 57 69 6e 64 6f 77 | w_struc|t.Window|
|000016d0| 53 74 72 75 63 74 0d 09 | 7b 0d 09 57 69 6e 64 6f |Struct..|{..Windo|
|000016e0| 77 52 65 63 6f 72 64 09 | 77 72 3b 20 20 2f 2a 20 |wRecord.|wr; /* |
|000016f0| 74 68 65 20 6f 72 69 67 | 69 6e 61 6c 20 77 69 6e |the orig|inal win|
|00001700| 64 6f 77 20 72 65 63 6f | 72 64 20 2a 2f 0d 09 75 |dow reco|rd */..u|
|00001710| 63 68 61 72 09 09 6d 74 | 6f 70 3b 09 09 2f 2a 20 |char..mt|op;../* |
|00001720| 6d 61 72 67 69 6e 20 69 | 6e 64 65 6e 74 73 20 2a |margin i|ndents *|
|00001730| 2f 0d 03 e0 ff 00 03 0c | 00 f7 09 75 63 68 61 72 |/.......|...uchar|
|00001740| 09 09 6d 6c 65 66 74 3b | 0d 09 75 63 68 61 72 09 |..mleft;|..uchar.|
|00001750| 09 6d 62 6f 74 74 6f 6d | 3b 0d 09 75 63 68 61 72 |.mbottom|;..uchar|
|00001760| 09 09 6d 72 69 67 68 74 | 3b 0d 09 52 65 63 74 09 |..mright|;..Rect.|
|00001770| 09 09 63 75 72 73 72 74 | 3b 20 20 20 20 2f 2a 20 |..cursrt|; /* |
|00001780| 75 73 65 64 20 66 6f 72 | 20 63 75 72 73 6f 72 20 |used for| cursor |
|00001790| 63 6f 6e 74 72 6f 6c 20 | 2a 2f 0d 09 63 68 61 72 |control |*/..char|
|000017a0| 09 09 09 6d 6f 75 73 65 | 72 3b 09 2f 2a 20 6d 6f |...mouse|r;./* mo|
|000017b0| 75 73 65 20 70 6f 69 6e | 74 65 72 20 69 64 20 20 |use poin|ter id |
|000017c0| 2a 2f 0d 09 63 68 61 72 | 09 09 09 63 68 61 6e 67 |*/..char|...chang|
|000017d0| 65 64 3b 09 2f 2a 20 69 | 66 20 63 6f 6e 74 65 6e |ed;./* i|f conten|
|000017e0| 74 73 20 77 65 72 65 20 | 63 68 61 6e 67 65 64 20 |ts were |changed |
|000017f0| 2a 2f 0d 09 6c 6f 6e 67 | 09 09 09 63 6b 69 6e 64 |*/..long|...ckind|
|00001800| 3b 09 09 2f 2a 20 6b 69 | 6e 64 20 6f 66 20 63 6f |;../* ki|nd of co|
|00001810| 6e 74 65 6e 74 73 20 2a | 2f 0d 09 73 68 6f 72 74 |ntents *|/..short|
|00001820| 09 09 66 69 6c 65 72 65 | 66 3b 09 2f 2a 20 61 73 |..filere|f;./* as|
|00001830| 73 6f 63 69 61 74 65 64 | 20 66 69 6c 65 2c 20 69 |sociated| file, i|
|00001840| 66 20 61 6e 79 20 2a 2f | 0d 09 54 45 48 61 6e 64 |f any */|..TEHand|
|00001850| 6c 65 09 63 75 72 74 65 | 78 74 3b 09 2f 2a 20 68 |le.curte|xt;./* h|
|00001860| 61 6e 64 6c 65 20 74 6f | 20 63 75 72 72 65 6e 74 |andle to| current|
|00001870| 20 74 65 78 74 20 2a 2f | 0d 09 7d 3b 0d 09 0d 57 | text */|..};...W|
|00001880| 69 6e 64 6f 77 53 74 72 | 75 63 74 09 09 2a 57 69 |indowStr|uct..*Wi|
|00001890| 6e 64 6f 77 4e 65 77 28 | 29 3b 0d 0d 23 64 65 66 |ndowNew(|);..#def|
|000018a0| 69 6e 65 09 57 6f 66 66 | 73 65 74 09 09 31 38 0d |ine.Woff|set..18.|
|000018b0| 23 64 65 66 69 6e 65 09 | 53 42 61 72 57 69 64 74 |#define.|SBarWidt|
|000018c0| 68 09 31 35 0d 0d 2f 2a | 20 74 68 65 73 65 20 64 |h.15../*| these d|
|000018d0| 65 66 69 6e 69 74 69 6f | 6e 73 20 61 6c 6c 6f 77 |efinitio|ns allow|
|000018e0| 20 65 61 73 79 20 67 65 | 6e 65 72 61 74 69 6f 6e | easy ge|neration|
|000018f0| 20 6f 66 20 74 68 65 20 | 66 6f 75 72 20 73 71 75 | of the |four squ|
|00001900| 61 72 65 20 63 6f 72 6e | 65 72 65 64 20 74 69 74 |are corn|ered tit|
|00001910| 6c 65 64 20 77 69 6e 64 | 6f 77 73 2e 20 54 68 65 |led wind|ows. The|
|00001920| 20 62 61 73 69 63 20 28 | 73 69 6d 70 6c 65 73 74 | basic (|simplest|
|00001930| 29 20 77 69 6e 64 6f 77 | 20 69 73 20 74 68 65 20 |) window| is the |
|00001940| 57 44 4f 43 20 28 4e 6f | 47 72 6f 77 44 6f 63 50 |WDOC (No|GrowDocP|
|00001950| 72 6f 63 29 2e 20 54 6f | 20 74 68 69 73 20 6f 70 |roc). To| this op|
|00001960| 74 69 6f 6e 61 6c 6c 79 | 20 61 64 64 20 57 47 52 |tionally| add WGR|
|00001970| 4f 57 20 74 6f 20 61 64 | 64 20 61 20 67 72 6f 77 |OW to ad|d a grow|
|00001980| 20 62 6f 78 20 61 6e 64 | 2f 6f 72 20 57 5a 4f 4f | box and|/or WZOO|
|00001990| 4d 20 74 6f 20 61 64 64 | 20 61 20 7a 6f 6f 6d 20 |M to add| a zoom |
|000019a0| 62 6f 78 2e 0d 20 2a 2f | 0d 23 64 65 66 69 6e 65 |box.. */|.#define|
|000019b0| 09 57 44 4f 43 09 09 34 | 0d 23 64 65 66 69 6e 65 |.WDOC..4|.#define|
|000019c0| 09 57 47 52 4f 57 09 09 | 2d 34 0d 23 64 65 66 69 |.WGROW..|-4.#defi|
|000019d0| 6e 65 09 57 5a 4f 4f 4d | 09 09 38 0d 23 64 65 66 |ne.WZOOM|..8.#def|
|000019e0| 69 6e 65 20 57 56 42 41 | 52 09 09 31 36 0d 23 64 |ine WVBA|R..16.#d|
|000019f0| 65 66 69 6e 65 09 57 48 | 42 41 52 09 09 33 32 0d |efine.WH|BAR..32.|
|00001a00| 0d 0d 2f 2a 20 56 61 6c | 75 65 20 70 6c 61 63 65 |../* Val|ue place|
|00001a10| 64 20 69 6e 20 77 69 6e | 64 6f 77 4b 69 6e 64 20 |d in win|dowKind |
|00001a20| 66 69 65 6c 64 20 6f 66 | 20 57 69 6e 64 6f 77 52 |field of| WindowR|
|00001a30| 65 63 6f 72 64 20 62 79 | 20 57 69 6e 64 6f 77 4e |ecord by| WindowN|
|00001a40| 65 77 20 69 66 20 74 68 | 65 20 77 69 6e 64 6f 77 |ew if th|e window|
|00001a50| 20 68 61 73 20 61 20 67 | 72 6f 77 20 62 6f 78 2e | has a g|row box.|
|00001a60| 20 54 68 69 73 20 69 73 | 20 75 73 65 64 20 62 79 | This is| used by|
|00001a70| 20 72 6f 75 74 69 6e 65 | 73 20 74 68 61 74 20 72 | routine|s that r|
|00001a80| 65 64 72 61 77 20 74 68 | 65 20 77 69 6e 64 6f 77 |edraw th|e window|
|00001a90| 20 74 6f 20 64 65 63 69 | 64 65 20 77 68 65 74 68 | to deci|de wheth|
|00001aa0| 65 72 20 74 6f 20 64 72 | 61 77 20 74 68 65 20 67 |er to dr|aw the g|
|00001ab0| 72 6f 77 20 62 6f 78 20 | 6f 72 20 6e 6f 74 20 0d |row box |or not .|
|00001ac0| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 09 48 41 53 47 | */.#def|ine.HASG|
|00001ad0| 52 4f 57 09 09 39 0d 0d | 23 65 6e 64 69 66 0d 0d |ROW..9..|#endif..|
|00001ae0| 2f 2a 20 63 75 72 73 6f | 72 68 65 6c 70 2e 68 0d |/* curso|rhelp.h.|
|00001af0| 20 2a 09 68 65 61 64 65 | 72 20 66 69 6c 65 20 66 | *.heade|r file f|
|00001b00| 6f 72 20 63 75 72 73 6f | 72 68 65 6c 70 0d 20 2a |or curso|rhelp. *|
|00001b10| 2f 0d 20 0d 03 f2 ff 00 | 03 0c 00 f7 20 23 64 65 |/. .....|.... #de|
|00001b20| 66 69 6e 65 09 41 52 52 | 4f 57 09 30 0d 20 23 64 |fine.ARR|OW.0. #d|
|00001b30| 65 66 69 6e 65 09 49 42 | 45 41 4d 09 09 31 0d 20 |efine.IB|EAM..1. |
|00001b40| 23 64 65 66 69 6e 65 09 | 43 52 4f 53 53 09 32 0d |#define.|CROSS.2.|
|00001b50| 20 23 64 65 66 69 6e 65 | 09 50 4c 55 53 09 09 33 | #define|.PLUS..3|
|00001b60| 0d 20 23 64 65 66 69 6e | 65 09 57 41 54 43 48 09 |. #defin|e.WATCH.|
|00001b70| 34 0d 20 0d 43 75 72 73 | 6f 72 48 65 6c 70 20 46 |4. .Curs|orHelp F|
|00001b80| 75 6e 63 74 69 6f 6e 73 | 0d 0d 23 69 6e 63 6c 75 |unctions|..#inclu|
|00001b90| 64 65 09 22 61 62 63 2e | 68 22 0d 23 69 6e 63 6c |de."abc.|h".#incl|
|00001ba0| 75 64 65 09 22 51 75 69 | 63 6b 64 72 61 77 2e 68 |ude."Qui|ckdraw.h|
|00001bb0| 22 0d 23 69 6e 63 6c 75 | 64 65 09 22 77 69 6e 64 |".#inclu|de."wind|
|00001bc0| 6f 77 4d 67 72 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |owMgr.h"|.#includ|
|00001bd0| 65 09 22 77 69 6e 64 6f | 77 68 65 6c 70 2e 68 22 |e."windo|whelp.h"|
|00001be0| 0d 23 69 6e 63 6c 75 64 | 65 09 22 63 75 72 73 6f |.#includ|e."curso|
|00001bf0| 72 68 65 6c 70 2e 68 22 | 0d 0d 2f 2a 20 43 75 72 |rhelp.h"|../* Cur|
|00001c00| 73 6f 72 4d 61 69 6e 74 | 61 69 6e 0d 20 2a 0d 20 |sorMaint|ain. *. |
|00001c10| 2a 20 41 64 6a 75 73 74 | 73 20 74 68 65 20 63 75 |* Adjust|s the cu|
|00001c20| 72 73 6f 72 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |rsor acc|ording t|
|00001c30| 6f 20 74 68 65 20 76 61 | 6c 75 65 0d 20 2a 20 73 |o the va|lue. * s|
|00001c40| 65 74 20 69 6e 20 74 68 | 65 20 77 69 6e 64 6f 77 |et in th|e window|
|00001c50| 20 61 6e 64 20 74 68 65 | 20 72 65 63 74 61 6e 67 | and the| rectang|
|00001c60| 6c 65 20 63 75 72 72 65 | 63 74 2e 0d 20 2a 20 49 |le curre|ct.. * I|
|00001c70| 66 20 74 68 65 20 6d 6f | 75 73 65 20 69 73 20 69 |f the mo|use is i|
|00001c80| 6e 20 74 68 65 20 72 65 | 63 74 61 6e 67 6c 65 2c |n the re|ctangle,|
|00001c90| 20 74 68 65 20 63 75 72 | 73 6f 72 20 0d 20 2a 20 | the cur|sor . * |
|00001ca0| 73 65 74 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |set to t|he curre|
|00001cb0| 6e 74 20 63 75 72 73 6f | 72 2c 20 6f 74 68 65 72 |nt curso|r, other|
|00001cc0| 77 69 73 65 20 69 74 20 | 69 73 0d 20 2a 20 73 65 |wise it |is. * se|
|00001cd0| 74 20 74 6f 20 74 68 65 | 20 61 72 72 6f 77 2e 0d |t to the| arrow..|
|00001ce0| 20 2a 0d 20 2a 20 54 68 | 65 20 69 66 20 73 74 61 | *. * Th|e if sta|
|00001cf0| 74 65 6d 65 6e 74 20 63 | 68 65 63 6b 73 20 74 6f |tement c|hecks to|
|00001d00| 20 73 65 65 20 69 66 20 | 74 68 65 72 65 20 69 73 | see if |there is|
|00001d10| 20 61 20 0d 20 2a 20 76 | 61 6c 69 64 20 77 69 6e | a . * v|alid win|
|00001d20| 64 6f 77 20 61 6e 64 20 | 69 66 20 74 68 65 20 77 |dow and |if the w|
|00001d30| 69 6e 64 6f 77 20 62 65 | 6c 6f 6e 67 73 20 74 6f |indow be|longs to|
|00001d40| 20 74 68 65 0d 20 2a 20 | 61 70 70 6c 69 63 61 74 | the. * |applicat|
|00001d50| 69 6f 6e 2e 20 49 66 20 | 69 74 20 64 6f 65 73 20 |ion. If |it does |
|00001d60| 6e 6f 74 20 62 65 6c 6f | 6e 67 20 74 6f 20 74 68 |not belo|ng to th|
|00001d70| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 0d 20 2a |e applic|ation. *|
|00001d80| 20 69 74 20 69 73 20 61 | 20 44 41 2e 20 49 66 20 | it is a| DA. If |
|00001d90| 74 68 65 20 44 41 20 69 | 73 20 63 6f 6e 74 72 6f |the DA i|s contro|
|00001da0| 6c 6c 69 6e 67 20 74 68 | 65 20 63 75 72 73 6f 72 |lling th|e cursor|
|00001db0| 2c 20 74 68 65 72 65 0d | 20 2a 20 77 69 6c 6c 20 |, there.| * will |
|00001dc0| 62 65 20 61 20 63 6f 6e | 66 6c 69 63 74 20 61 73 |be a con|flict as|
|00001dd0| 20 62 6f 74 68 20 70 72 | 6f 67 72 61 6d 73 20 61 | both pr|ograms a|
|00001de0| 74 74 65 6d 70 74 20 74 | 6f 20 63 6f 6e 74 72 6f |ttempt t|o contro|
|00001df0| 6c 0d 20 2a 20 69 74 2e | 0d 20 2a 0d 20 2a 2f 0d |l. * it.|. *. */.|
|00001e00| 43 75 72 73 6f 72 4d 61 | 69 6e 74 61 69 6e 28 77 |CursorMa|intain(w|
|00001e10| 73 29 0d 09 57 69 6e 64 | 6f 77 53 74 72 75 63 74 |s)..Wind|owStruct|
|00001e20| 09 2a 77 73 3b 0d 7b 0d | 09 50 6f 69 6e 74 09 09 |.*ws;.{.|.Point..|
|00001e30| 09 70 74 3b 0d 09 43 75 | 72 73 48 61 6e 64 6c 65 |.pt;..Cu|rsHandle|
|00001e40| 09 09 63 75 72 73 3b 0d | 09 73 68 6f 72 74 09 09 |..curs;.|.short..|
|00001e50| 09 63 75 72 63 75 72 73 | 6f 72 3b 20 2f 2a 20 63 |.curcurs|or; /* c|
|00001e60| 75 72 72 65 6e 74 20 63 | 75 72 73 6f 72 20 2a 2f |urrent c|ursor */|
|00001e70| 0d 09 0d 09 69 66 20 28 | 77 73 20 26 26 20 28 28 |....if (|ws && ((|
|00001e80| 28 57 69 6e 64 6f 77 52 | 65 63 6f 72 64 20 2a 29 |(WindowR|ecord *)|
|00001e90| 77 73 29 2d 3e 77 69 6e | 64 6f 77 4b 69 6e 64 20 |ws)->win|dowKind |
|00001ea0| 3e 20 37 29 20 29 0d 09 | 09 7b 0d 09 09 47 65 74 |> 7) )..|.{...Get|
|00001eb0| 4d 6f 75 73 65 28 26 70 | 74 29 3b 0d 09 09 63 75 |Mouse(&p|t);...cu|
|00001ec0| 72 63 75 72 73 6f 72 20 | 3d 20 77 73 2d 3e 6d 6f |rcursor |= ws->mo|
|00001ed0| 75 73 65 72 3b 20 20 2f | 2a 20 63 75 72 73 6f 72 |user; /|* cursor|
|00001ee0| 20 6b 69 6e 64 20 69 73 | 20 73 74 6f 72 65 64 20 | kind is| stored |
|00001ef0| 69 6e 20 74 68 65 20 77 | 69 6e 64 6f 77 20 73 74 |in the w|indow st|
|00001f00| 72 75 63 74 20 2a 2f 0d | 03 f1 ff 00 03 0c 00 f7 |ruct */.|........|
|00001f10| 09 09 69 66 20 28 28 50 | 74 49 6e 52 65 63 74 28 |..if ((P|tInRect(|
|00001f20| 70 74 2c 20 26 28 77 73 | 2d 3e 63 75 72 73 72 74 |pt, &(ws|->cursrt|
|00001f30| 29 29 29 20 26 26 20 28 | 63 75 72 63 75 72 73 6f |))) && (|curcurso|
|00001f40| 72 29 29 0d 09 09 09 7b | 0d 09 09 09 63 75 72 73 |r))....{|....curs|
|00001f50| 20 3d 20 28 43 75 72 73 | 6f 72 20 2a 2a 29 47 65 | = (Curs|or **)Ge|
|00001f60| 74 43 75 72 73 6f 72 28 | 63 75 72 63 75 72 73 6f |tCursor(|curcurso|
|00001f70| 72 29 3b 09 0d 09 09 09 | 53 65 74 43 75 72 73 6f |r);.....|SetCurso|
|00001f80| 72 28 2a 63 75 72 73 29 | 3b 20 0d 09 09 09 7d 0d |r(*curs)|; ....}.|
|00001f90| 09 09 65 6c 73 65 20 69 | 66 20 28 63 75 72 63 75 |..else i|f (curcu|
|00001fa0| 72 73 6f 72 20 21 3d 20 | 57 41 54 43 48 29 0d 09 |rsor != |WATCH)..|
|00001fb0| 09 09 7b 0d 09 09 09 49 | 6e 69 74 43 75 72 73 6f |..{....I|nitCurso|
|00001fc0| 72 28 29 3b 0d 09 09 09 | 7d 0d 09 09 7d 0d 09 69 |r();....|}...}..i|
|00001fd0| 66 20 28 77 73 20 3d 3d | 20 4e 49 4c 29 0d 09 09 |f (ws ==| NIL)...|
|00001fe0| 49 6e 69 74 43 75 72 73 | 6f 72 28 29 3b 0d 7d 0d |InitCurs|or();.}.|
|00001ff0| 0d 0d 2f 2a 20 43 75 72 | 73 6f 72 52 65 63 74 0d |../* Cur|sorRect.|
|00002000| 20 2a 0d 20 2a 20 55 73 | 65 73 20 74 68 65 20 70 | *. * Us|es the p|
|00002010| 6f 72 74 52 65 63 74 20 | 6f 66 20 74 68 65 20 77 |ortRect |of the w|
|00002020| 69 6e 64 6f 77 20 70 61 | 73 73 65 64 20 69 6e 0d |indow pa|ssed in.|
|00002030| 20 2a 20 74 6f 20 73 65 | 74 20 74 68 65 20 63 75 | * to se|t the cu|
|00002040| 72 72 65 6e 74 20 72 65 | 63 74 61 6e 67 6c 65 2e |rrent re|ctangle.|
|00002050| 20 20 41 64 6a 75 73 74 | 73 20 74 68 65 20 73 69 | Adjust|s the si|
|00002060| 7a 65 0d 20 2a 20 6f 66 | 20 74 68 65 20 72 65 63 |ze. * of| the rec|
|00002070| 74 61 6e 67 6c 65 20 74 | 6f 20 61 63 63 6f 75 6e |tangle t|o accoun|
|00002080| 74 20 66 6f 72 20 77 69 | 6e 64 6f 77 20 6d 61 72 |t for wi|ndow mar|
|00002090| 67 69 6e 73 2e 0d 20 2a | 0d 20 2a 0d 20 2a 20 42 |gins.. *|. *. * B|
|000020a0| 79 20 6b 65 65 70 69 6e | 67 20 74 68 65 20 72 65 |y keepin|g the re|
|000020b0| 63 74 61 6e 67 6c 65 20 | 61 72 6f 75 6e 64 2c 20 |ctangle |around, |
|000020c0| 77 65 20 65 6c 69 6d 69 | 6e 61 74 65 20 64 6f 69 |we elimi|nate doi|
|000020d0| 6e 67 0d 20 2a 20 74 68 | 69 73 20 65 61 63 68 20 |ng. * th|is each |
|000020e0| 74 69 6d 65 20 74 68 72 | 6f 75 67 68 20 74 68 65 |time thr|ough the|
|000020f0| 20 65 76 65 6e 74 20 6c | 6f 6f 70 2e 0d 20 2a 2f | event l|oop.. */|
|00002100| 0d 20 0d 43 75 72 73 6f | 72 52 65 63 74 28 77 73 |. .Curso|rRect(ws|
|00002110| 29 0d 09 57 69 6e 64 6f | 77 53 74 72 75 63 74 09 |)..Windo|wStruct.|
|00002120| 09 2a 77 73 3b 0d 7b 0d | 09 77 73 2d 3e 63 75 72 |.*ws;.{.|.ws->cur|
|00002130| 73 72 74 20 3d 20 28 28 | 47 72 61 66 50 6f 72 74 |srt = ((|GrafPort|
|00002140| 20 2a 29 77 73 29 2d 3e | 70 6f 72 74 52 65 63 74 | *)ws)->|portRect|
|00002150| 3b 0d 09 41 64 6a 75 73 | 74 52 65 63 74 28 26 28 |;..Adjus|tRect(&(|
|00002160| 77 73 2d 3e 63 75 72 73 | 72 74 29 2c 77 73 2d 3e |ws->curs|rt),ws->|
|00002170| 6d 74 6f 70 2c 77 73 2d | 3e 6d 6c 65 66 74 2c 77 |mtop,ws-|>mleft,w|
|00002180| 73 2d 3e 6d 62 6f 74 74 | 6f 6d 2c 77 73 2d 3e 6d |s->mbott|om,ws->m|
|00002190| 72 69 67 68 74 29 3b 0d | 7d 0d 0d 0d 2f 2a 20 43 |right);.|}.../* C|
|000021a0| 75 72 73 6f 72 54 6f 55 | 73 65 0d 20 2a 0d 20 2a |ursorToU|se. *. *|
|000021b0| 20 53 65 74 73 20 74 68 | 65 20 63 75 72 73 6f 72 | Sets th|e cursor|
|000021c0| 20 74 6f 20 62 65 20 64 | 69 73 70 6c 61 79 65 64 | to be d|isplayed|
|000021d0| 20 69 6e 20 74 68 65 0d | 20 2a 20 72 65 63 74 61 | in the.| * recta|
|000021e0| 6e 67 6c 65 20 6f 66 20 | 74 68 65 20 63 75 72 72 |ngle of |the curr|
|000021f0| 65 6e 74 20 77 69 6e 64 | 6f 77 2e 0d 20 2a 0d 20 |ent wind|ow.. *. |
|00002200| 2a 20 45 69 74 68 65 72 | 20 70 61 73 73 20 61 20 |* Either| pass a |
|00002210| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 65 20 77 |pointer |to the w|
|00002220| 69 6e 64 6f 77 20 73 74 | 72 75 63 74 0d 20 2a 20 |indow st|ruct. * |
|00002230| 6f 72 20 61 20 4e 55 4c | 4c 20 70 6f 69 6e 74 65 |or a NUL|L pointe|
|00002240| 72 2e 20 49 66 20 61 20 | 4e 55 4c 4c 20 70 6f 69 |r. If a |NULL poi|
|00002250| 6e 74 65 72 20 69 73 20 | 70 61 73 73 65 64 2c 0d |nter is |passed,.|
|00002260| 20 2a 20 43 75 72 73 6f | 72 54 6f 55 73 65 28 29 | * Curso|rToUse()|
|00002270| 20 77 69 6c 6c 20 75 73 | 65 20 74 68 65 20 66 72 | will us|e the fr|
|00002280| 6f 6e 74 20 77 69 6e 64 | 6f 77 2e 0d 20 2a 20 0d |ont wind|ow.. * .|
|00002290| 20 2a 20 4e 6f 74 65 3a | 20 41 74 20 6c 65 61 73 | * Note:| At leas|
|000022a0| 74 20 6f 6e 65 20 77 69 | 6e 64 6f 77 20 6d 75 73 |t one wi|ndow mus|
|000022b0| 74 20 65 78 69 73 74 20 | 66 6f 72 20 74 68 69 73 |t exist |for this|
|000022c0| 0d 20 2a 09 74 6f 20 77 | 6f 72 6b 2c 20 62 75 74 |. *.to w|ork, but|
|000022d0| 20 69 66 20 6e 6f 20 77 | 69 6e 64 6f 77 73 20 65 | if no w|indows e|
|000022e0| 78 69 73 74 2c 20 69 74 | 0d 20 2a 09 77 69 6c 6c |xist, it|. *.will|
|000022f0| 20 6e 6f 74 20 68 75 72 | 74 2e 0d 04 27 ff 00 03 | not hur|t...'...|
|00002300| 0c 00 f7 20 2a 2f 0d 43 | 75 72 73 6f 72 54 6f 55 |... */.C|ursorToU|
|00002310| 73 65 28 77 73 2c 63 29 | 0d 09 57 69 6e 64 6f 77 |se(ws,c)|..Window|
|00002320| 53 74 72 75 63 74 09 2a | 77 73 3b 09 2f 2a 20 77 |Struct.*|ws;./* w|
|00002330| 69 6e 64 6f 77 20 73 74 | 72 75 63 74 20 74 6f 20 |indow st|ruct to |
|00002340| 73 65 74 20 63 75 72 73 | 6f 72 20 66 6f 72 20 2a |set curs|or for *|
|00002350| 2f 0d 09 73 68 6f 72 74 | 09 09 09 09 63 3b 09 09 |/..short|....c;..|
|00002360| 2f 2a 20 63 75 72 73 6f | 72 20 63 6f 64 65 20 74 |/* curso|r code t|
|00002370| 6f 20 75 73 65 20 2a 2f | 0d 7b 0d 09 69 66 20 28 |o use */|.{..if (|
|00002380| 21 77 73 29 0d 09 09 77 | 73 20 3d 20 28 57 69 6e |!ws)...w|s = (Win|
|00002390| 64 6f 77 53 74 72 75 63 | 74 20 2a 29 46 72 6f 6e |dowStruc|t *)Fron|
|000023a0| 74 57 69 6e 64 6f 77 28 | 29 3b 0d 09 69 66 20 28 |tWindow(|);..if (|
|000023b0| 77 73 29 0d 20 09 09 77 | 73 2d 3e 6d 6f 75 73 65 |ws). ..w|s->mouse|
|000023c0| 72 20 3d 20 63 3b 0d 7d | 0d 20 0d 55 73 69 6e 67 |r = c;.}|. .Using|
|000023d0| 20 43 75 72 73 6f 72 4d | 61 69 6e 74 61 69 6e 28 | CursorM|aintain(|
|000023e0| 29 0d 0d 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |)..The f|ollowing|
|000023f0| 20 66 72 61 67 6d 65 6e | 74 20 73 68 6f 77 73 20 | fragmen|t shows |
|00002400| 74 68 65 20 63 61 6c 6c | 20 74 6f 20 43 75 72 73 |the call| to Curs|
|00002410| 6f 72 4d 61 69 6e 74 61 | 69 6e 28 29 20 69 6e 20 |orMainta|in() in |
|00002420| 74 68 65 20 6d 61 69 6e | 20 65 76 65 6e 74 20 6c |the main| event l|
|00002430| 6f 6f 70 2e 0d 0d 45 76 | 65 6e 74 4c 6f 6f 70 28 |oop...Ev|entLoop(|
|00002440| 29 0d 7b 0d 09 45 76 65 | 6e 74 52 65 63 6f 72 64 |).{..Eve|ntRecord|
|00002450| 09 09 74 68 65 45 76 65 | 6e 74 3b 0d 09 63 68 61 |..theEve|nt;..cha|
|00002460| 72 09 09 09 63 3b 0d 09 | 73 68 6f 72 74 09 09 09 |r...c;..|short...|
|00002470| 77 69 6e 64 6f 77 63 6f | 64 65 3b 0d 09 57 69 6e |windowco|de;..Win|
|00002480| 64 6f 77 50 74 72 09 09 | 77 70 3b 0d 09 57 69 6e |dowPtr..|wp;..Win|
|00002490| 64 6f 77 53 74 72 75 63 | 74 09 2a 77 73 3b 0d 09 |dowStruc|t.*ws;..|
|000024a0| 0d 09 77 68 69 6c 65 28 | 54 72 75 65 29 0d 09 09 |..while(|True)...|
|000024b0| 7b 0d 09 09 77 70 20 3d | 20 46 72 6f 6e 74 57 69 |{...wp =| FrontWi|
|000024c0| 6e 64 6f 77 28 29 3b 0d | 09 09 53 79 73 74 65 6d |ndow();.|..System|
|000024d0| 54 61 73 6b 28 29 3b 0d | 09 09 43 75 72 73 6f 72 |Task();.|..Cursor|
|000024e0| 4d 61 69 6e 74 61 69 6e | 28 77 70 29 3b 09 0d 09 |Maintain|(wp);...|
|000024f0| 09 69 66 20 28 77 70 29 | 0d 09 09 09 7b 0d 09 09 |.if (wp)|....{...|
|00002500| 09 41 70 70 54 61 73 6b | 28 77 70 29 3b 0d 09 09 |.AppTask|(wp);...|
|00002510| 09 7d 09 09 0d 09 09 69 | 66 20 28 47 65 74 4e 65 |.}.....i|f (GetNe|
|00002520| 78 74 45 76 65 6e 74 28 | 65 76 65 72 79 45 76 65 |xtEvent(|everyEve|
|00002530| 6e 74 2c 26 74 68 65 45 | 76 65 6e 74 29 29 0d 09 |nt,&theE|vent))..|
|00002540| 09 09 73 77 69 74 63 68 | 28 74 68 65 45 76 65 6e |..switch|(theEven|
|00002550| 74 2e 77 68 61 74 29 0d | 09 09 09 09 2e 0d 4f 74 |t.what).|......Ot|
|00002560| 68 65 72 20 43 6f 6d 6d | 65 6e 74 73 0d 0d 43 68 |her Comm|ents..Ch|
|00002570| 65 63 6b 20 4a 6f 68 6e | 20 4e 61 69 72 6e d5 73 |eck John| Nairn.s|
|00002580| 20 61 72 74 69 63 6c 65 | 20 66 6f 72 20 6f 74 68 | article| for oth|
|00002590| 65 72 20 74 68 69 6e 67 | 73 20 74 6f 20 64 6f 20 |er thing|s to do |
|000025a0| 74 6f 20 61 75 74 6f 6d | 61 74 65 20 63 75 72 73 |to autom|ate curs|
|000025b0| 6f 72 20 63 6f 6e 74 72 | 6f 6c 2e 20 59 6f 75 20 |or contr|ol. You |
|000025c0| 77 69 6c 6c 20 6e 6f 74 | 65 20 68 65 20 63 68 65 |will not|e he che|
|000025d0| 63 6b 73 20 66 6f 72 20 | 63 65 72 74 61 69 6e 20 |cks for |certain |
|000025e0| 6b 65 79 73 20 62 65 69 | 6e 67 20 70 72 65 73 73 |keys bei|ng press|
|000025f0| 65 64 20 74 6f 20 63 68 | 61 6e 67 65 20 74 68 65 |ed to ch|ange the|
|00002600| 20 63 75 72 73 6f 72 20 | 74 6f 20 61 6c 6c 6f 77 | cursor |to allow|
|00002610| 20 77 69 6e 64 6f 77 20 | 73 63 72 6f 6c 6c 69 6e | window |scrollin|
|00002620| 67 20 28 65 2e 67 2e 20 | 77 69 74 68 20 61 20 68 |g (e.g. |with a h|
|00002630| 61 6e 64 29 2e 20 0d 09 | 09 09 09 2e 0d 4c 61 73 |and). ..|.....Las|
|00002640| 74 20 54 69 6d 65 0d 0d | 49 20 68 61 76 65 20 61 |t Time..|I have a|
|00002650| 20 6d 69 6e 6f 72 20 65 | 72 72 6f 72 20 69 6e 20 | minor e|rror in |
|00002660| 4a 75 6e 65 d5 73 20 63 | 6f 6c 75 6d 6e 2e 20 49 |June.s c|olumn. I|
|00002670| 20 69 6e 63 6c 75 64 65 | 64 20 73 6f 6d 65 20 73 | include|d some s|
|00002680| 70 61 63 65 20 69 6e 20 | 74 68 65 20 77 69 6e 64 |pace in |the wind|
|00002690| 6f 77 20 73 74 72 75 63 | 74 75 72 65 20 74 6f 20 |ow struc|ture to |
|000026a0| 68 61 6e 64 6c 65 20 77 | 69 6e 64 6f 77 20 7a 6f |handle w|indow zo|
|000026b0| 6f 6d 69 6e 67 2e 20 54 | 68 65 73 65 20 61 72 65 |oming. T|hese are|
|000026c0| 20 6e 6f 74 20 6e 65 65 | 64 65 64 20 61 73 20 7a | not nee|ded as z|
|000026d0| 6f 6f 6d 69 6e 67 20 69 | 73 20 66 75 6c 6c 79 20 |ooming i|s fully |
|000026e0| 73 75 70 70 6f 72 74 65 | 64 20 62 79 20 74 68 65 |supporte|d by the|
|000026f0| 20 4d 61 63 20 54 6f 6f | 6c 62 6f 78 2e 20 49 20 | Mac Too|lbox. I |
|00002700| 68 61 64 6e d5 74 20 75 | 73 65 64 20 74 68 65 6d |hadn.t u|sed them|
|00002710| 20 66 6f 72 20 61 6e 79 | 74 68 69 6e 67 20 79 65 | for any|thing ye|
|00002720| 74 2e 20 0d 02 2c ff 00 | 03 0c 00 f7 0d 4e 65 78 |t. ..,..|.....Nex|
|00002730| 74 20 54 69 6d 65 0d 0d | 4e 65 78 74 20 74 69 6d |t Time..|Next tim|
|00002740| 65 20 49 20 61 6d 20 67 | 6f 69 6e 67 20 74 6f 20 |e I am g|oing to |
|00002750| 73 68 6f 77 20 61 20 71 | 75 69 63 6b 20 61 6e 64 |show a q|uick and|
|00002760| 20 76 65 72 79 20 64 69 | 72 74 79 20 77 61 79 20 | very di|rty way |
|00002770| 74 6f 20 68 65 6c 70 20 | 64 65 61 6c 20 77 69 74 |to help |deal wit|
|00002780| 68 20 6d 65 6e 75 73 2e | 20 0d 0d 50 2e 53 2e 20 |h menus.| ..P.S. |
|00002790| 43 6f 6d 6d 65 6e 74 73 | 20 61 72 65 20 77 65 6c |Comments| are wel|
|000027a0| 63 6f 6d 65 2e 20 53 65 | 6e 64 20 79 6f 75 72 20 |come. Se|nd your |
|000027b0| 6e 6f 74 65 73 20 74 6f | 20 4d 61 63 54 75 74 6f |notes to| MacTuto|
|000027c0| 72 2c 20 61 6e 64 20 70 | 6c 65 61 73 65 20 69 6e |r, and p|lease in|
|000027d0| 63 6c 75 64 65 20 61 20 | 70 68 6f 6e 65 20 6e 75 |clude a |phone nu|
|000027e0| 6d 62 65 72 2e 0d 03 77 | 01 23 64 65 66 69 6e 65 |mber...w|.#define|
|000027f0| 09 57 47 52 4f 57 09 23 | 64 65 66 69 6e 65 09 57 |.WGROW.#|define.W|
|00002800| 5a 4f 4f 4d 09 23 64 65 | 66 69 6e 65 09 57 48 42 |ZOOM.#de|fine.WHB|
|00002810| 41 52 09 23 64 65 66 69 | 6e 65 09 48 41 53 47 52 |AR.#defi|ne.HASGR|
|00002820| 4f 57 09 09 43 75 72 73 | 48 61 6e 64 6c 65 09 09 |OW..Curs|Handle..|
|00002830| 09 09 09 09 09 09 09 09 | 09 09 0d 09 09 09 09 2a |........|.......*|
|00002840| 20 6b 69 6e 64 20 6f 66 | 20 63 6f 6e 74 65 6e 74 | kind of| content|
|00002850| 73 20 28 66 69 6c 65 20 | 74 79 70 65 29 20 2a 2f |s (file |type) */|
|00002860| 0d 09 73 68 6f 72 74 09 | 09 09 66 69 6c 65 72 65 |..short.|..filere|
|00002870| 66 3b 09 2f 2a 20 61 73 | 73 6f 63 69 61 74 65 64 |f;./* as|sociated|
|00002880| 20 66 69 6c 65 2c 20 69 | 66 20 61 6e 79 20 2a 2f | file, i|f any */|
|00002890| 0d 09 54 45 48 61 6e 64 | 6c 65 09 63 75 72 74 65 |..TEHand|le.curte|
|000028a0| 78 74 3b 09 2f 2a 20 68 | 61 6e 64 6c 65 20 74 6f |xt;./* h|andle to|
|000028b0| 20 63 75 72 72 65 6e 74 | 20 74 65 78 74 20 72 65 | current| text re|
|000028c0| 63 6f 72 64 20 66 6f 72 | 20 2a 2f 0d 09 7d 3b 0d |cord for| */..};.|
|000028d0| 09 0d 57 69 6e 64 6f 77 | 53 74 72 75 63 74 09 09 |..Window|Struct..|
|000028e0| 2a 57 69 6e 64 6f 77 4e | 65 77 28 29 3b 0d 0d 23 |*WindowN|ew();..#|
|000028f0| 64 65 66 69 6e 65 09 57 | 6f 66 66 73 65 74 09 09 |define.W|offset..|
|00002900| 31 38 0d 23 64 65 66 69 | 6e 65 09 53 42 61 72 57 |18.#defi|ne.SBarW|
|00002910| 69 64 74 68 09 31 35 0d | 0d 2f 2a 20 74 68 65 73 |idth.15.|./* thes|
|00002920| 65 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 61 6c |e defini|tions al|
|00002930| 6c 6f 77 20 65 61 73 79 | 20 67 65 6e 65 72 61 74 |low easy| generat|
|00002940| 69 6f 6e 20 6f 66 20 01 | 01 1d 01 33 01 40 01 4c |ion of .|...3.@.L|
|00002950| 0e 0d 00 04 0d 0d 0d 0d | 00 04 0d 0d 0d 0d 00 36 |........|.......6|
|00002960| 24 00 02 00 01 86 24 00 | 07 7d 01 77 24 00 0c e8 |$.....$.|.}.w$...|
|00002970| 01 95 24 00 13 4e 02 67 | 24 00 17 32 06 09 24 00 |..$..N.g|$..2..$.|
|00002980| 1b 14 04 a1 24 00 1f 08 | 04 ec 24 00 22 fb 06 cc |....$...|..$."...|
|00002990| 24 00 27 24 03 a2 00 0c | 04 00 29 52 00 3c 04 00 |$.'$....|..)R.<..|
|000029a0| 29 58 00 3c 00 00 00 78 | 00 03 00 00 00 48 00 48 |)X.<...x|.....H.H|
|000029b0| 00 00 00 00 02 da 02 28 | ff e1 ff e2 02 f9 02 46 |.......(|.......F|
|000029c0| 03 47 05 28 03 fc 00 02 | 00 00 00 48 00 48 00 00 |.G.(....|...H.H..|
|000029d0| 00 00 02 da 02 28 00 01 | 00 00 00 64 00 00 00 01 |.....(..|...d....|
|000029e0| 00 01 01 01 00 00 00 01 | 27 0f 00 01 00 01 00 00 |........|'.......|
|000029f0| 00 00 00 00 00 00 00 00 | 00 00 00 0a 00 19 01 90 |........|........|
|00002a00| 00 00 00 00 00 40 00 00 | 00 00 00 00 00 00 00 01 |.....@..|........|
|00002a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a20| 00 06 00 08 00 00 00 00 | 00 36 24 00 02 00 01 d0 |........|.6$.....|
|00002a30| 24 00 07 7d 01 b0 24 00 | 0c e8 01 e0 24 00 13 4e |$..}..$.|....$..N|
|00002a40| 02 30 24 00 17 32 04 10 | 24 00 1b 14 03 30 24 00 |.0$..2..|$....0$.|
|00002a50| 1f 08 03 90 24 00 22 fb | 04 30 24 00 27 24 02 60 |....$.".|.0$.'$.`|
|00002a60| 00 0c 04 00 29 52 00 40 | 04 00 29 58 00 40 02 31 |....)R.@|..)X.@.1|
|00002a70| fc 00 48 01 44 00 5a 02 | 0c 01 b0 02 40 f7 ff 00 |..H.D.Z.|....@...|
|00002a80| 15 0a 01 f7 4d 61 6e 61 | 67 69 6e 67 20 43 75 72 |....Mana|ging Cur|
|00002a90| 73 6f 72 73 ff 00 14 0a | 00 f7 0d ff 00 14 0a 02 |sors....|........|
|00002aa0| f7 49 20 6b 6e 6f 77 20 | 68 6f 77 20 74 6f 20 63 |.I know |how to c|
|00002ab0| 75 72 73 65 c9 ff 00 14 | 0a 00 f7 0d 53 68 61 6b |urse....|....Shak|
|00002ac0| 65 73 70 65 61 72 65 2c | 20 ff 00 14 0a 01 f7 54 |espeare,| ......T|
|00002ad0| 68 65 20 54 65 6d 70 65 | 73 74 ff 00 14 0a 00 f7 |he Tempe|st......|
|00002ae0| 20 28 41 63 74 20 31 2c | 20 53 63 65 6e 65 20 32 | (Act 1,| Scene 2|
|00002af0| 29 0d fc 00 48 01 44 00 | 5a 01 0c 01 b0 02 40 f7 |)...H.D.|Z.....@.|
|00002b00| 49 66 20 79 6f 75 20 72 | 65 6d 65 6d 62 65 72 20 |If you r|emember |
|00002b10| 66 72 6f 6d 20 6c 61 73 | 74 20 74 69 6d 65 2c 20 |from las|t time, |
|00002b20| 49 20 68 61 64 20 69 6e | 74 72 6f 64 75 63 65 64 |I had in|troduced|
|00002b30| 20 74 68 65 20 69 64 65 | 61 20 6f 66 20 61 64 64 | the ide|a of add|
|00002b40| 69 6e 67 20 73 6f 6d 65 | 20 61 64 64 69 74 69 6f |ing some| additio|
|00002b50| 6e 61 6c 20 64 61 74 61 | 20 73 74 72 75 63 74 75 |nal data| structu|
|00002b60| 72 65 73 20 61 74 20 74 | 68 65 20 65 6e 64 20 6f |res at t|he end o|
|00002b70| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 20 72 65 63 |f the wi|ndow rec|
|00002b80| 6f 72 64 20 74 6f 20 61 | 69 64 20 69 6e 20 6b 65 |ord to a|id in ke|
|00002b90| 65 70 69 6e 67 20 74 72 | 61 63 6b 20 6f 66 20 74 |eping tr|ack of t|
|00002ba0| 68 65 20 64 61 74 61 20 | 74 68 61 74 20 68 61 6e |he data |that han|
|00002bb0| 67 73 20 61 72 6f 75 6e | 64 20 77 69 74 68 20 61 |gs aroun|d with a|
|00002bc0| 20 77 69 6e 64 6f 77 2e | 20 41 74 20 74 68 65 20 | window.| At the |
|00002bd0| 65 6e 64 20 6f 66 20 74 | 68 61 74 20 61 72 74 69 |end of t|hat arti|
|00002be0| 63 6c 65 20 49 20 73 61 | 69 64 20 77 65 20 77 6f |cle I sa|id we wo|
|00002bf0| 75 6c 64 20 69 6c 6c 75 | 73 74 72 61 74 65 20 74 |uld illu|strate t|
|00002c00| 68 65 20 75 73 65 20 6f | 66 20 74 68 65 20 61 64 |he use o|f the ad|
|00002c10| 64 65 64 20 64 61 74 61 | 20 69 6e 20 6d 61 6e 61 |ded data| in mana|
|00002c20| 67 69 6e 67 20 74 68 65 | 20 63 75 72 73 6f 72 2e |ging the| cursor.|
|00002c30| 20 57 65 20 77 69 6c 6c | 20 63 6f 76 65 72 20 74 | We will| cover t|
|00002c40| 68 61 74 2c 20 62 75 74 | 20 66 69 72 73 74 20 49 |hat, but| first I|
|00002c50| 20 77 6f 75 6c 64 20 6c | 69 6b 65 20 74 6f 20 63 | would l|ike to c|
|00002c60| 6f 6d 6d 65 6e 74 20 6f | 6e 20 61 20 6e 69 63 65 |omment o|n a nice|
|00002c70| 20 70 69 65 63 65 20 6f | 66 20 77 6f 72 6b 20 62 | piece o|f work b|
|00002c80| 79 20 4a 6f 68 6e 20 4e | 61 69 72 6e 20 69 6e 20 |y John N|airn in |
|00002c90| 74 68 65 20 41 70 72 69 | 6c 20 69 73 73 75 65 2e |the Apri|l issue.|
|00002ca0| 0d 03 75 4a 6f 68 6e 20 | 68 61 73 20 70 72 65 73 |..uJohn |has pres|
|00002cb0| 65 6e 74 65 64 20 61 20 | 66 75 6c 6c 2d 62 6c 6f |ented a |full-blo|
|00002cc0| 77 6e 20 53 63 72 6f 6c | 6c 69 6e 67 20 4d 61 6e |wn Scrol|ling Man|
|00002cd0| 61 67 65 72 20 74 6f 20 | 68 61 6e 64 6c 65 20 61 |ager to |handle a|
|00002ce0| 6c 6c 20 74 68 65 20 69 | 73 73 75 65 73 20 69 6e |ll the i|ssues in|
|00002cf0| 76 6f 6c 76 65 64 20 77 | 69 74 68 20 63 72 65 61 |volved w|ith crea|
|00002d00| 74 69 6e 67 20 61 6e 64 | 20 6d 61 69 6e 74 61 69 |ting and| maintai|
|00002d10| 6e 69 6e 67 20 73 63 72 | 6f 6c 6c 69 6e 67 20 77 |ning scr|olling w|
|00002d20| 69 6e 64 6f 77 73 2e 20 | 57 68 69 6c 65 20 74 68 |indows. |While th|
|00002d30| 65 72 65 20 61 72 65 20 | 61 20 6e 75 6d 62 65 72 |ere are |a number|
|00002d40| 20 6f 66 20 64 69 66 66 | 65 72 65 6e 63 65 73 20 | of diff|erences |
|00002d50| 62 65 74 77 65 65 6e 20 | 77 68 61 74 20 68 65 20 |between |what he |
|00002d60| 68 61 73 20 64 6f 6e 65 | 20 61 6e 64 20 77 68 61 |has done| and wha|
|00002d70| 74 20 49 20 61 6d 20 64 | 65 73 63 72 69 62 69 6e |t I am d|escribin|
|00002d80| 67 20 69 6e 20 74 68 69 | 73 20 63 6f 6c 75 6d 6e |g in thi|s column|
|00002d90| 2c 20 61 20 63 6f 75 70 | 6c 65 20 63 6f 6d 6d 6f |, a coup|le commo|
|00002da0| 6e 20 70 6f 69 6e 74 73 | 20 61 72 65 20 77 6f 72 |n points| are wor|
|00002db0| 74 68 20 6d 65 6e 74 69 | 6f 6e 69 6e 67 2e 20 46 |th menti|oning. F|
|00002dc0| 69 72 73 74 2c 20 74 68 | 65 20 61 70 70 72 6f 61 |irst, th|e approa|
|00002dd0| 63 68 20 69 73 20 74 6f | 20 69 73 6f 6c 61 74 65 |ch is to| isolate|
|00002de0| 20 74 68 65 20 75 73 65 | 72 20 69 6e 74 65 72 66 | the use|r interf|
|00002df0| 61 63 65 20 63 6f 6e 74 | 72 6f 6c 20 66 72 6f 6d |ace cont|rol from|
|00002e00| 20 74 68 65 20 61 63 74 | 75 61 6c 20 61 70 70 6c | the act|ual appl|
|00002e10| 69 63 61 74 69 6f 6e 2e | 20 54 68 61 74 20 69 73 |ication.| That is|
|00002e20| 2c 20 61 73 20 6d 75 63 | 68 20 61 73 20 70 6f 73 |, as muc|h as pos|
|00002e30| 73 69 62 6c 65 2c 20 64 | 65 76 65 6c 6f 70 20 67 |sible, d|evelop g|
|00002e40| 65 6e 65 72 69 63 20 63 | 6f 64 65 20 74 6f 20 68 |eneric c|ode to h|
|00002e50| 61 6e 64 6c 65 20 74 68 | 65 20 62 61 73 69 63 20 |andle th|e basic |
|00002e60| 6f 70 65 72 61 74 69 6f | 6e 20 6f 66 20 74 68 65 |operatio|n of the|
|00002e70| 20 77 69 6e 64 6f 77 73 | 20 28 6f 72 20 6d 65 6e | windows| (or men|
|00002e80| 75 73 20 6f 72 20 64 69 | 61 6c 6f 67 73 2c 20 66 |us or di|alogs, f|
|00002e90| 6f 72 20 74 68 61 74 20 | 6d 61 74 74 65 72 29 2e |or that |matter).|
|00002ea0| 20 53 65 63 6f 6e 64 2c | 20 74 68 69 73 20 67 65 | Second,| this ge|
|00002eb0| 6e 65 72 69 63 20 63 6f | 64 65 20 77 69 6c 6c 20 |neric co|de will |
|00002ec0| 70 72 6f 62 61 62 6c 79 | 20 72 65 71 75 69 72 65 |probably| require|
|00002ed0| 20 73 6f 6d 65 20 70 6c | 61 63 65 20 74 6f 20 6b | some pl|ace to k|
|00002ee0| 65 65 70 20 74 68 65 20 | 69 6e 66 6f 72 6d 61 74 |eep the |informat|
|00002ef0| 69 6f 6e 20 69 74 20 75 | 73 65 73 3b 20 64 65 76 |ion it u|ses; dev|
|00002f00| 65 6c 6f 70 20 61 20 64 | 61 74 61 20 73 74 72 75 |elop a d|ata stru|
|00002f10| 63 74 75 72 65 20 74 6f | 20 68 6f 6c 64 20 74 68 |cture to| hold th|
|00002f20| 69 73 2c 20 61 6e 64 20 | 61 74 74 61 63 68 20 69 |is, and |attach i|
|00002f30| 74 20 69 6e 20 73 6f 6d | 65 20 77 61 79 20 74 6f |t in som|e way to|
|00002f40| 20 74 68 65 20 77 69 6e | 64 6f 77 20 28 6f 72 20 | the win|dow (or |
|00002f50| 6d 65 6e 75 20 6f 72 20 | 64 69 61 6c 6f 67 29 2e |menu or |dialog).|
|00002f60| 20 54 68 65 72 65 20 69 | 73 20 61 63 74 75 61 6c | There i|s actual|
|00002f70| 6c 79 20 61 20 62 69 74 | 20 6d 6f 72 65 20 63 6f |ly a bit| more co|
|00002f80| 6d 6d 6f 6e 61 6c 69 74 | 79 20 28 49 20 68 61 76 |mmonalit|y (I hav|
|00002f90| 65 20 74 68 65 20 61 64 | 76 61 6e 74 61 67 65 20 |e the ad|vantage |
|00002fa0| 6f 66 20 62 65 69 6e 67 | 20 61 62 6c 65 20 74 6f |of being| able to|
|00002fb0| 20 73 65 65 20 74 68 65 | 20 70 61 72 74 73 20 49 | see the| parts I|
|00002fc0| 20 68 61 76 65 20 77 72 | 69 74 74 65 6e 20 62 75 | have wr|itten bu|
|00002fd0| 74 20 6e 6f 74 20 79 65 | 74 20 70 75 62 6c 69 73 |t not ye|t publis|
|00002fe0| 68 65 64 29 2c 20 61 6e | 64 20 77 65 20 77 69 6c |hed), an|d we wil|
|00002ff0| 6c 20 65 78 70 6c 6f 72 | 65 20 6f 6e 65 20 6f 66 |l explor|e one of|
|00003000| 20 74 68 6f 73 65 20 69 | 6e 20 74 68 69 73 20 61 | those i|n this a|
|00003010| 72 74 69 63 6c 65 2e 0d | 02 08 4f 6e 65 20 70 6f |rticle..|..One po|
|00003020| 69 6e 74 20 6f 66 20 64 | 69 66 66 65 72 65 6e 63 |int of d|ifferenc|
|00003030| 65 2e 20 4a 6f 68 6e 20 | 75 73 65 73 20 74 68 65 |e. John |uses the|
|00003040| 20 77 69 6e 64 6f 77 d5 | 73 20 72 65 66 43 6f 6e | window.|s refCon|
|00003050| 20 74 6f 20 68 6f 6c 64 | 20 68 69 73 20 61 64 64 | to hold| his add|
|00003060| 69 74 69 6f 6e 61 6c 20 | 64 61 74 61 20 73 74 72 |itional |data str|
|00003070| 75 63 74 75 72 65 2e 20 | 48 69 73 20 6e 65 77 20 |ucture. |His new |
|00003080| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 20 69 |data str|ucture i|
|00003090| 6e 63 6c 75 64 65 73 20 | 69 74 73 20 6f 77 6e 20 |ncludes |its own |
|000030a0| 72 65 66 43 6f 6e 20 66 | 6f 72 20 74 68 65 20 77 |refCon f|or the w|
|000030b0| 69 6e 64 6f 77 d5 73 20 | 63 6f 6e 74 65 6e 74 73 |indow.s |contents|
|000030c0| 2e 20 49 20 61 64 64 65 | 64 20 74 68 65 20 64 61 |. I adde|d the da|
|000030d0| 74 61 20 6f 6e 20 74 6f | 20 74 68 65 20 65 6e 64 |ta on to| the end|
|000030e0| 20 6f 66 20 74 68 65 20 | 77 69 6e 64 6f 77 d5 73 | of the |window.s|
|000030f0| 20 73 74 72 75 63 74 75 | 72 65 20 69 74 73 65 6c | structu|re itsel|
|00003100| 66 2e 20 49 20 66 65 65 | 6c 20 74 68 69 73 20 73 |f. I fee|l this s|
|00003110| 69 6d 70 6c 69 66 69 65 | 73 20 74 68 69 6e 67 73 |implifie|s things|
|00003120| 20 73 6f 6d 65 77 68 61 | 74 2c 20 61 6e 64 20 61 | somewha|t, and a|
|00003130| 74 20 6c 65 61 73 74 20 | 66 6f 72 20 6e 6f 77 20 |t least |for now |
|00003140| 69 74 20 64 6f 65 73 20 | 6e 6f 74 20 73 65 65 6d |it does |not seem|
|00003150| 20 74 6f 20 76 69 6f 6c | 61 74 65 20 61 6e 79 20 | to viol|ate any |
|00003160| 72 75 6c 65 73 2e 20 49 | 66 20 79 6f 75 20 6c 69 |rules. I|f you li|
|00003170| 6b 65 64 20 4a 6f 68 6e | d5 73 20 61 72 74 69 63 |ked John|.s artic|
|00003180| 6c 65 20 61 73 20 49 20 | 64 69 64 2c 20 79 6f 75 |le as I |did, you|
|00003190| 20 63 65 72 74 61 69 6e | 6c 79 20 68 61 76 65 20 | certain|ly have |
|000031a0| 6d 79 20 70 65 72 6d 69 | 73 73 69 6f 6e 20 74 6f |my permi|ssion to|
|000031b0| 20 75 73 65 20 74 68 65 | 20 74 65 63 68 6e 69 71 | use the| techniq|
|000031c0| 75 65 20 49 d5 76 65 20 | 6f 75 74 6c 69 6e 65 64 |ue I.ve |outlined|
|000031d0| 20 69 6e 20 69 6d 70 6c | 65 6d 65 6e 74 69 6e 67 | in impl|ementing|
|000031e0| 20 69 74 2e 20 57 68 69 | 6c 65 20 49 20 68 61 76 | it. Whi|le I hav|
|000031f0| 65 6e d5 74 20 6d 65 74 | 20 4a 6f 68 6e 2c 20 49 |en.t met| John, I|
|00003200| d5 6d 20 72 65 61 73 6f | 6e 61 62 6c 79 20 73 75 |.m reaso|nably su|
|00003210| 72 65 20 68 65 20 77 6f | 6e d5 74 20 6d 69 6e 64 |re he wo|n.t mind|
|00003220| 2e 0d 03 80 0d fc 00 48 | 01 44 00 5a 02 0c 01 b0 |.......H|.D.Z....|
|00003230| 02 40 f7 ff 00 15 0a 01 | f7 43 75 72 73 6f 72 73 |.@......|.Cursors|
|00003240| ff 00 14 0a 00 f7 0d fc | 00 48 01 44 00 5a 01 0c |........|.H.D.Z..|
|00003250| 01 b0 02 40 f7 54 68 65 | 20 63 75 72 73 6f 72 20 |...@.The| cursor |
|00003260| 61 74 74 61 63 68 65 64 | 20 74 6f 20 74 68 65 20 |attached| to the |
|00003270| 6d 6f 75 73 65 20 63 68 | 61 6e 67 65 73 20 69 74 |mouse ch|anges it|
|00003280| 73 20 73 68 61 70 65 20 | 61 73 20 79 6f 75 20 6d |s shape |as you m|
|00003290| 6f 76 65 20 74 68 65 20 | 6d 6f 75 73 65 20 61 72 |ove the |mouse ar|
|000032a0| 6f 75 6e 64 20 74 68 65 | 20 73 63 72 65 65 6e 2e |ound the| screen.|
|000032b0| 20 49 6e 20 61 64 64 69 | 74 69 6f 6e 2c 20 74 68 | In addi|tion, th|
|000032c0| 65 20 75 73 65 72 20 63 | 61 6e 20 6f 66 74 65 6e |e user c|an often|
|000032d0| 20 61 66 66 65 63 74 20 | 69 74 73 20 73 68 61 70 | affect |its shap|
|000032e0| 65 20 64 69 72 65 63 74 | 6c 79 20 62 79 20 73 65 |e direct|ly by se|
|000032f0| 6c 65 63 74 69 6e 67 20 | 61 20 74 6f 6f 6c 20 66 |lecting |a tool f|
|00003300| 72 6f 6d 20 61 20 74 6f | 6f 6c 62 6f 78 20 28 75 |rom a to|olbox (u|
|00003310| 73 75 61 6c 6c 79 20 66 | 6f 75 6e 64 20 69 6e 20 |sually f|ound in |
|00003320| 67 72 61 70 68 69 63 73 | 20 6f 72 20 70 61 67 65 |graphics| or page|
|00003330| 20 6c 61 79 6f 75 74 20 | 61 70 70 6c 69 63 61 74 | layout |applicat|
|00003340| 69 6f 6e 73 29 2e 20 54 | 68 65 20 70 72 6f 62 6c |ions). T|he probl|
|00003350| 65 6d 20 77 65 20 64 65 | 61 6c 20 77 69 74 68 20 |em we de|al with |
|00003360| 74 68 69 73 20 6d 6f 6e | 74 68 20 69 73 20 68 6f |this mon|th is ho|
|00003370| 77 20 74 6f 20 6d 61 6e | 61 67 65 20 74 68 65 20 |w to man|age the |
|00003380| 63 75 72 73 6f 72 20 73 | 6f 20 69 74 20 69 73 20 |cursor s|o it is |
|00003390| 68 61 6e 64 6c 65 64 20 | 61 73 20 61 75 74 6f 6d |handled |as autom|
|000033a0| 61 74 69 63 61 6c 6c 79 | 20 61 73 20 70 6f 73 73 |atically| as poss|
|000033b0| 69 62 6c 65 2e 0d 54 68 | 65 20 66 69 72 73 74 20 |ible..Th|e first |
|000033c0| 69 73 73 75 65 20 69 73 | 20 67 65 74 74 69 6e 67 |issue is| getting|
|000033d0| 20 63 75 72 73 6f 72 73 | 2e 20 54 68 65 72 65 20 | cursors|. There |
|000033e0| 61 72 65 20 66 69 76 65 | 20 62 75 69 6c 74 20 69 |are five| built i|
|000033f0| 6e 20 74 6f 20 74 68 65 | 20 4d 61 63 3a 20 61 72 |n to the| Mac: ar|
|00003400| 72 6f 77 2c 20 63 72 6f | 73 73 68 61 69 72 73 2c |row, cro|sshairs,|
|00003410| 20 70 6c 75 73 2c 20 63 | 6c 6f 63 6b 2c 20 69 2d | plus, c|lock, i-|
|00003420| 62 65 61 6d 2e 20 59 6f | 75 20 63 61 6e 20 61 6c |beam. Yo|u can al|
|00003430| 73 6f 20 6d 61 6b 65 20 | 79 6f 75 72 20 6f 77 6e |so make |your own|
|00003440| 20 77 69 74 68 20 52 65 | 73 45 64 69 74 20 6f 72 | with Re|sEdit or|
|00003450| 20 73 6f 6d 65 20 6f 74 | 68 65 72 20 72 65 73 6f | some ot|her reso|
|00003460| 75 72 63 65 20 74 6f 6f | 6c 2e 20 4f 6e 63 65 20 |urce too|l. Once |
|00003470| 77 65 20 68 61 76 65 20 | 64 65 63 69 64 65 64 20 |we have |decided |
|00003480| 74 68 65 20 63 75 72 73 | 6f 72 73 20 74 6f 20 75 |the curs|ors to u|
|00003490| 73 65 20 28 61 6e 64 20 | 6d 61 64 65 20 74 68 65 |se (and |made the|
|000034a0| 69 72 20 72 65 73 6f 75 | 72 63 65 73 29 2c 20 77 |ir resou|rces), w|
|000034b0| 65 20 6e 65 65 64 20 74 | 6f 20 63 6f 6e 74 72 6f |e need t|o contro|
|000034c0| 6c 20 74 68 65 20 61 70 | 70 65 61 72 61 6e 63 65 |l the ap|pearance|
|000034d0| 20 6f 6e 20 74 68 65 20 | 73 63 72 65 65 6e 2e 20 | on the |screen. |
|000034e0| 57 68 61 74 20 49 20 77 | 69 6c 6c 20 64 65 73 63 |What I w|ill desc|
|000034f0| 72 69 62 65 20 74 68 69 | 73 20 6d 6f 6e 74 68 20 |ribe thi|s month |
|00003500| 69 73 20 6f 6e 65 20 77 | 61 79 20 74 6f 20 6d 61 |is one w|ay to ma|
|00003510| 6e 61 67 65 20 74 68 65 | 20 63 68 61 6e 67 65 20 |nage the| change |
|00003520| 6f 66 20 63 75 72 73 6f | 72 20 73 68 61 70 65 20 |of curso|r shape |
|00003530| 61 73 20 74 68 65 20 75 | 73 65 72 20 6d 6f 76 65 |as the u|ser move|
|00003540| 73 20 74 68 65 20 6d 6f | 75 73 65 20 61 72 6f 75 |s the mo|use arou|
|00003550| 6e 64 20 74 68 65 20 73 | 63 72 65 65 6e 2e 20 49 |nd the s|creen. I|
|00003560| 20 61 6d 20 6e 6f 74 20 | 63 6f 76 65 72 69 6e 67 | am not |covering|
|00003570| 20 74 68 65 20 73 65 74 | 74 69 6e 67 20 6f 66 20 | the set|ting of |
|00003580| 74 68 65 20 63 75 72 73 | 6f 72 d5 73 20 76 69 61 |the curs|or.s via|
|00003590| 20 74 6f 6f 6c 20 62 6f | 78 20 6f 72 20 6d 65 6e | tool bo|x or men|
|000035a0| 75 73 2e 0d 02 41 49 6e | 20 4a 75 6e 65 20 49 20 |us...AIn| June I |
|000035b0| 73 75 67 67 65 73 74 65 | 64 20 74 68 65 20 75 73 |suggeste|d the us|
|000035c0| 65 20 6f 66 20 77 69 6e | 64 6f 77 20 6d 61 72 67 |e of win|dow marg|
|000035d0| 69 6e 73 2e 20 54 68 65 | 20 77 69 6e 64 6f 77 20 |ins. The| window |
|000035e0| 6d 61 72 67 69 6e 20 69 | 73 20 74 68 61 74 20 61 |margin i|s that a|
|000035f0| 72 65 61 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |rea betw|een the |
|00003600| 77 69 6e 64 6f 77 d5 73 | 20 66 72 61 6d 65 2c 20 |window.s| frame, |
|00003610| 77 68 69 63 68 20 69 73 | 20 68 61 6e 64 6c 65 64 |which is| handled|
|00003620| 20 62 79 20 74 68 65 20 | 4d 61 63 69 6e 74 6f 73 | by the |Macintos|
|00003630| 68 20 74 6f 6f 6c 62 6f | 78 20 72 6f 75 74 69 6e |h toolbo|x routin|
|00003640| 65 73 2c 20 61 6e 64 20 | 74 68 65 20 77 69 6e 64 |es, and |the wind|
|00003650| 6f 77 d5 73 20 61 63 74 | 75 61 6c 20 63 6f 6e 74 |ow.s act|ual cont|
|00003660| 65 6e 74 73 2c 20 77 68 | 69 63 68 20 69 73 20 77 |ents, wh|ich is w|
|00003670| 68 61 74 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |hat your| applica|
|00003680| 74 69 6f 6e 20 69 73 20 | 61 62 6f 75 74 2e 20 54 |tion is |about. T|
|00003690| 68 65 20 6f 62 6a 65 63 | 74 73 20 74 68 61 74 20 |he objec|ts that |
|000036a0| 6d 69 67 68 74 20 62 65 | 20 69 6e 20 61 20 77 69 |might be| in a wi|
|000036b0| 6e 64 6f 77 20 6d 61 72 | 67 69 6e 20 69 6e 63 6c |ndow mar|gin incl|
|000036c0| 75 64 65 20 73 63 72 6f | 6c 6c 20 62 61 72 73 2c |ude scro|ll bars,|
|000036d0| 20 72 75 6c 65 72 73 2c | 20 61 6e 64 20 74 6f 6f | rulers,| and too|
|000036e0| 6c 20 62 6f 78 65 73 2e | 20 54 68 65 73 65 20 61 |l boxes.| These a|
|000036f0| 72 65 20 73 75 63 68 20 | 63 6f 6d 6d 6f 6e 20 63 |re such |common c|
|00003700| 6f 6d 70 6f 6e 65 6e 74 | 73 20 6f 66 20 77 69 6e |omponent|s of win|
|00003710| 64 6f 77 73 20 74 68 61 | 74 20 74 68 65 79 20 63 |dows tha|t they c|
|00003720| 61 6e 20 62 65 20 68 61 | 6e 64 6c 65 64 20 62 79 |an be ha|ndled by|
|00003730| 20 67 65 6e 65 72 69 63 | 20 63 6f 64 65 20 61 70 | generic| code ap|
|00003740| 61 72 74 20 66 72 6f 6d | 20 79 6f 75 72 20 61 70 |art from| your ap|
|00003750| 70 6c 69 63 61 74 69 6f | 6e 2e 20 54 68 65 20 6f |plicatio|n. The o|
|00003760| 74 68 65 72 20 70 72 6f | 70 65 72 74 79 20 6f 66 |ther pro|perty of|
|00003770| 20 74 68 65 20 77 69 6e | 64 6f 77 20 6d 61 72 67 | the win|dow marg|
|00003780| 69 6e 20 69 73 20 74 68 | 61 74 20 74 68 65 20 63 |in is th|at the c|
|00003790| 75 72 73 6f 72 20 74 79 | 70 69 63 61 6c 6c 79 20 |ursor ty|pically |
|000037a0| 63 68 61 6e 67 65 73 20 | 69 6e 74 6f 20 74 68 65 |changes |into the|
|000037b0| 20 61 72 72 6f 77 20 61 | 73 20 69 74 20 69 73 20 | arrow a|s it is |
|000037c0| 6d 6f 76 65 64 20 69 6e | 74 6f 20 74 68 65 20 73 |moved in|to the s|
|000037d0| 63 72 6f 6c 6c 20 62 61 | 72 2c 20 72 75 6c 65 72 |croll ba|r, ruler|
|000037e0| 2c 20 65 74 63 2e 0d 04 | 43 0d fc 00 48 01 44 00 |, etc...|C...H.D.|
|000037f0| 5a 02 0c 01 b0 02 40 f7 | ff 00 15 0a 01 f7 43 75 |Z.....@.|......Cu|
|00003800| 72 73 6f 72 68 65 6c 70 | ff 00 14 0a 00 f7 0d fc |rsorhelp|........|
|00003810| 00 48 01 44 00 5a 01 0c | 01 b0 02 40 f7 43 75 72 |.H.D.Z..|...@.Cur|
|00003820| 73 6f 72 68 65 6c 70 20 | 63 6f 6e 73 69 73 74 73 |sorhelp |consists|
|00003830| 20 6f 66 20 74 68 72 65 | 65 20 66 75 6e 63 74 69 | of thre|e functi|
|00003840| 6f 6e 73 20 61 6e 64 20 | 61 6e 20 69 6e 63 6c 75 |ons and |an inclu|
|00003850| 64 65 20 66 69 6c 65 20 | 74 6f 20 61 69 64 20 69 |de file |to aid i|
|00003860| 6e 20 74 68 65 20 73 65 | 74 74 69 6e 67 20 61 6e |n the se|tting an|
|00003870| 64 20 61 75 74 6f 6d 61 | 74 69 63 20 63 68 61 6e |d automa|tic chan|
|00003880| 67 69 6e 67 20 6f 66 20 | 63 75 72 73 6f 72 73 2e |ging of |cursors.|
|00003890| 20 54 68 65 73 65 20 66 | 75 6e 63 74 69 6f 6e 73 | These f|unctions|
|000038a0| 20 61 73 73 75 6d 65 20 | 74 68 65 20 77 69 6e 64 | assume |the wind|
|000038b0| 6f 77 20 73 74 72 75 63 | 74 75 72 65 20 64 65 73 |ow struc|ture des|
|000038c0| 63 72 69 62 65 64 20 69 | 6e 20 4a 75 6e 65 2e 20 |cribed i|n June. |
|000038d0| 54 68 65 20 77 69 6e 64 | 6f 77 20 6d 61 72 67 69 |The wind|ow margi|
|000038e0| 6e 73 20 28 6d 74 6f 70 | 2c 6d 62 6f 74 74 6f 6d |ns (mtop|,mbottom|
|000038f0| 2c 20 6d 72 69 67 68 74 | 2c 20 6d 6c 65 66 74 29 |, mright|, mleft)|
|00003900| 20 61 72 65 20 73 74 6f | 72 65 64 20 77 69 74 68 | are sto|red with|
|00003910| 20 74 68 65 20 77 69 6e | 64 6f 77 2e 20 4d 6f 72 | the win|dow. Mor|
|00003920| 65 20 69 6d 70 6f 72 74 | 61 6e 74 6c 79 2c 20 74 |e import|antly, t|
|00003930| 68 65 20 72 65 63 74 61 | 6e 67 6c 65 20 74 68 61 |he recta|ngle tha|
|00003940| 74 20 73 75 72 72 6f 75 | 6e 64 73 20 74 68 65 20 |t surrou|nds the |
|00003950| 61 63 74 75 61 6c 20 77 | 69 6e 64 6f 77 20 63 6f |actual w|indow co|
|00003960| 6e 74 65 6e 74 73 20 28 | 63 75 72 73 72 74 29 20 |ntents (|cursrt) |
|00003970| 69 73 20 61 6c 73 6f 20 | 73 74 6f 72 65 64 20 28 |is also |stored (|
|00003980| 49 20 61 73 73 75 6d 65 | 20 72 65 63 74 61 6e 67 |I assume| rectang|
|00003990| 75 6c 61 72 20 77 69 6e | 64 6f 77 73 29 2e 20 54 |ular win|dows). T|
|000039a0| 68 69 73 20 72 65 63 74 | 61 6e 67 6c 65 20 69 73 |his rect|angle is|
|000039b0| 20 74 68 65 20 61 72 65 | 61 20 69 6e 20 77 68 69 | the are|a in whi|
|000039c0| 63 68 20 74 68 65 20 63 | 75 72 73 6f 72 20 69 73 |ch the c|ursor is|
|000039d0| 20 74 68 65 20 73 68 61 | 70 65 20 74 68 65 20 75 | the sha|pe the u|
|000039e0| 73 65 72 20 73 65 6c 65 | 63 74 65 64 20 28 69 20 |ser sele|cted (i |
|000039f0| 62 65 61 6d 2c 20 63 72 | 6f 73 73 2c 20 65 74 63 |beam, cr|oss, etc|
|00003a00| 2e 29 2e 20 49 20 70 75 | 74 20 69 74 20 69 6e 20 |.). I pu|t it in |
|00003a10| 74 68 65 20 77 69 6e 64 | 6f 77 20 73 74 72 75 63 |the wind|ow struc|
|00003a20| 74 75 72 65 20 73 69 6d | 70 6c 79 20 74 6f 20 61 |ture sim|ply to a|
|00003a30| 76 6f 69 64 20 68 61 76 | 69 6e 67 20 74 6f 20 63 |void hav|ing to c|
|00003a40| 61 6c 63 75 6c 61 74 65 | 20 69 74 20 65 61 63 68 |alculate| it each|
|00003a50| 20 74 69 6d 65 2e 20 54 | 68 65 20 66 69 6e 61 6c | time. T|he final|
|00003a60| 20 70 69 65 63 65 20 69 | 73 20 74 68 65 20 63 75 | piece i|s the cu|
|00003a70| 72 73 6f 72 20 69 74 73 | 65 6c 66 20 28 6d 6f 75 |rsor its|elf (mou|
|00003a80| 73 65 72 29 2e 20 54 68 | 61 74 20 69 73 2c 20 74 |ser). Th|at is, t|
|00003a90| 68 65 20 63 75 72 73 6f | 72 d5 73 20 73 68 61 70 |he curso|r.s shap|
|00003aa0| 65 20 61 73 20 73 65 6c | 65 63 74 65 64 20 62 79 |e as sel|ected by|
|00003ab0| 20 74 68 65 20 75 73 65 | 72 20 69 73 20 61 20 70 | the use|r is a p|
|00003ac0| 72 6f 70 65 72 74 79 20 | 6f 66 20 74 68 65 20 77 |roperty |of the w|
|00003ad0| 69 6e 64 6f 77 2e 20 57 | 69 74 68 20 61 20 6d 75 |indow. W|ith a mu|
|00003ae0| 6c 74 69 2d 77 69 6e 64 | 6f 77 20 61 70 70 6c 69 |lti-wind|ow appli|
|00003af0| 63 61 74 69 6f 6e 20 74 | 68 65 20 75 73 65 72 20 |cation t|he user |
|00003b00| 63 61 6e 20 68 61 76 65 | 20 6f 6e 65 20 77 69 6e |can have| one win|
|00003b10| 64 6f 77 20 65 64 69 74 | 69 6e 67 20 74 65 78 74 |dow edit|ing text|
|00003b20| 2c 20 61 6e 6f 74 68 65 | 72 20 65 64 69 74 69 6e |, anothe|r editin|
|00003b30| 67 20 61 20 67 72 61 70 | 68 69 63 2c 20 61 6e 64 |g a grap|hic, and|
|00003b40| 20 61 20 74 68 69 72 64 | 20 65 64 69 74 69 6e 67 | a third| editing|
|00003b50| 20 61 20 73 70 72 65 61 | 64 73 68 65 65 74 20 28 | a sprea|dsheet (|
|00003b60| 49 20 61 6d 20 6e 6f 74 | 20 73 75 67 67 65 73 74 |I am not| suggest|
|00003b70| 69 6e 67 20 61 6e 79 6f | 6e 65 20 61 63 74 75 61 |ing anyo|ne actua|
|00003b80| 6c 6c 79 20 77 72 69 74 | 65 20 73 6f 6d 65 74 68 |lly writ|e someth|
|00003b90| 69 6e 67 20 6c 69 6b 65 | 20 74 68 69 73 29 2c 20 |ing like| this), |
|00003ba0| 61 6e 64 20 74 68 65 20 | 61 70 70 72 6f 70 72 69 |and the |appropri|
|00003bb0| 61 74 65 20 63 75 72 73 | 6f 72 20 77 69 6c 6c 20 |ate curs|or will |
|00003bc0| 62 65 20 64 69 73 70 6c | 61 79 65 64 20 61 75 74 |be displ|ayed aut|
|00003bd0| 6f 6d 61 74 69 63 61 6c | 6c 79 20 61 73 20 74 68 |omatical|ly as th|
|00003be0| 65 20 75 73 65 72 20 73 | 65 6c 65 63 74 73 20 65 |e user s|elects e|
|00003bf0| 61 63 68 20 77 69 6e 64 | 6f 77 2e 20 54 68 65 20 |ach wind|ow. The |
|00003c00| 6d 61 69 6e 20 6c 6f 6f | 70 20 6e 65 65 64 20 6b |main loo|p need k|
|00003c10| 6e 6f 77 20 6e 6f 74 68 | 69 6e 67 20 6f 66 20 74 |now noth|ing of t|
|00003c20| 68 65 20 63 75 72 73 6f | 72 73 2e 0d 02 4f 54 68 |he curso|rs...OTh|
|00003c30| 65 20 6d 61 69 6e 20 6c | 6f 6f 70 20 64 6f 65 73 |e main l|oop does|
|00003c40| 20 6e 65 65 64 20 74 6f | 20 73 65 74 20 74 68 65 | need to| set the|
|00003c50| 20 63 75 72 73 6f 72 2e | 20 54 68 65 72 65 20 61 | cursor.| There a|
|00003c60| 72 65 20 74 77 6f 20 70 | 6c 61 63 65 73 20 77 68 |re two p|laces wh|
|00003c70| 65 72 65 20 74 68 69 73 | 20 63 61 6e 20 6f 63 63 |ere this| can occ|
|00003c80| 75 72 3a 20 74 68 65 20 | 75 73 65 72 73 20 73 70 |ur: the |users sp|
|00003c90| 65 63 69 66 69 65 73 20 | 61 20 63 75 72 73 6f 72 |ecifies |a cursor|
|00003ca0| 20 69 6e 20 73 6f 6d 65 | 20 77 61 79 20 6f 72 2c | in some| way or,|
|00003cb0| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00003cc0| 20 64 69 73 70 6c 61 79 | 73 20 74 68 65 20 77 61 | display|s the wa|
|00003cd0| 74 63 68 20 28 6f 72 20 | 6f 74 68 65 72 20 69 6e |tch (or |other in|
|00003ce0| 64 69 63 61 74 6f 72 29 | 20 74 6f 20 69 6e 64 69 |dicator)| to indi|
|00003cf0| 63 61 74 65 20 74 68 65 | 20 70 61 73 73 61 67 65 |cate the| passage|
|00003d00| 20 6f 66 20 74 69 6d 65 | 2e 20 54 68 65 20 70 72 | of time|. The pr|
|00003d10| 6f 67 72 61 6d 20 63 61 | 6c 6c 73 20 43 75 72 73 |ogram ca|lls Curs|
|00003d20| 6f 72 54 6f 55 73 65 20 | 70 61 73 73 69 6e 67 20 |orToUse |passing |
|00003d30| 74 68 65 20 77 69 6e 64 | 6f 77 20 61 6e 64 20 74 |the wind|ow and t|
|00003d40| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 74 68 65 |he numbe|r of the|
|00003d50| 20 64 65 73 69 72 65 64 | 20 63 75 72 73 6f 72 2e | desired| cursor.|
|00003d60| 0d 54 68 65 20 70 72 6f | 67 72 61 6d 20 61 6c 73 |.The pro|gram als|
|00003d70| 6f 20 6e 65 65 64 73 20 | 74 6f 20 73 65 74 20 74 |o needs |to set t|
|00003d80| 68 65 20 63 75 72 73 6f | 72 20 72 65 63 74 61 6e |he curso|r rectan|
|00003d90| 67 6c 65 2e 20 54 68 69 | 73 20 6d 75 73 74 20 62 |gle. Thi|s must b|
|00003da0| 65 20 64 6f 6e 65 20 65 | 76 65 72 79 20 74 69 6d |e done e|very tim|
|00003db0| 65 20 74 68 65 20 77 69 | 6e 64 6f 77 d5 73 20 73 |e the wi|ndow.s s|
|00003dc0| 69 7a 65 20 69 73 20 63 | 68 61 6e 67 65 64 20 6f |ize is c|hanged o|
|00003dd0| 72 20 74 68 65 20 77 69 | 6e 64 6f 77 20 6d 61 72 |r the wi|ndow mar|
|00003de0| 67 69 6e 73 20 61 72 65 | 20 63 68 61 6e 67 65 64 |gins are| changed|
|00003df0| 20 28 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 63 | (for ex|ample, c|
|00003e00| 68 6f 6f 73 69 6e 67 20 | 74 6f 20 73 68 6f 77 20 |hoosing |to show |
|00003e10| 72 75 6c 65 72 73 20 6f | 72 20 6e 6f 74 29 2e 41 |rulers o|r not).A|
|00003e20| 20 63 61 6c 6c 20 74 6f | 20 43 75 72 73 6f 72 52 | call to| CursorR|
|00003e30| 65 63 74 28 29 20 64 6f | 65 73 20 74 68 61 74 2e |ect() do|es that.|
|00003e40| 20 4e 6f 74 65 20 74 68 | 61 74 20 74 68 65 20 77 | Note th|at the w|
|00003e50| 69 6e 64 6f 77 20 6d 61 | 72 67 69 6e 73 20 6d 75 |indow ma|rgins mu|
|00003e60| 73 74 20 68 61 76 65 20 | 62 65 65 6e 20 70 72 65 |st have |been pre|
|00003e70| 76 69 6f 75 73 6c 79 20 | 73 65 74 2e 0d 02 1e 54 |viously |set....T|
|00003e80| 6f 20 61 63 74 75 61 6c | 6c 79 20 63 6f 6e 74 72 |o actual|ly contr|
|00003e90| 6f 6c 20 74 68 65 20 63 | 75 72 73 6f 72 2c 20 74 |ol the c|ursor, t|
|00003ea0| 68 65 20 70 72 6f 67 72 | 61 6d 20 63 61 6c 6c 73 |he progr|am calls|
|00003eb0| 20 43 75 72 73 6f 72 4d | 61 69 6e 74 61 69 6e 28 | CursorM|aintain(|
|00003ec0| 29 20 61 73 20 69 74 20 | 72 75 6e 73 20 74 68 72 |) as it |runs thr|
|00003ed0| 6f 75 67 68 20 74 68 65 | 20 65 76 65 6e 74 20 6c |ough the| event l|
|00003ee0| 6f 6f 70 2e 0d 0d fc 00 | 48 01 44 00 5a 02 0c 01 |oop.....|H.D.Z...|
|00003ef0| b0 02 40 f7 ff 00 15 0a | 01 f7 49 6e 63 6c 75 64 |..@.....|..Includ|
|00003f00| 65 20 46 69 6c 65 73 ff | 00 14 0a 00 f7 0d fc 00 |e Files.|........|
|00003f10| 48 01 44 00 48 00 09 01 | 44 01 68 01 8c 01 b0 01 |H.D.H...|D.h.....|
|00003f20| d4 01 f0 08 02 1c 02 40 | f7 ff 00 14 0a 00 f7 ff |.......@|........|
|00003f30| 00 c1 09 00 f7 2f 2a 77 | 69 6e 64 6f 77 68 65 6c |...../*w|indowhel|
|00003f40| 70 2e 68 20 2a 2f 0d ff | 00 c1 09 01 f7 23 69 6e |p.h */..|.....#in|
|00003f50| 63 6c 75 64 65 ff 00 c1 | 09 00 f7 20 22 54 65 78 |clude...|... "Tex|
|00003f60| 74 45 64 69 74 2e 68 22 | 0d 09 0d ff 00 c1 09 01 |tEdit.h"|........|
|00003f70| f7 23 69 66 6e 64 65 66 | ff 00 c1 09 00 f7 20 57 |.#ifndef|...... W|
|00003f80| 49 4e 44 4f 57 48 45 4c | 50 5f 48 0d ff 00 c1 09 |INDOWHEL|P_H.....|
|00003f90| 01 f7 23 64 65 66 69 6e | 65 ff 00 c1 09 00 f7 20 |..#defin|e...... |
|00003fa0| 57 49 4e 44 4f 57 48 45 | 4c 50 5f 48 0d ff 00 c1 |WINDOWHE|LP_H....|
|00003fb0| 09 01 f7 23 69 6e 63 6c | 75 64 65 ff 00 c1 09 00 |...#incl|ude.....|
|00003fc0| f7 09 22 61 62 63 2e 68 | 22 20 20 20 20 2f 2a 20 |.."abc.h|" /* |
|00003fd0| 77 69 6e 64 6f 77 20 61 | 64 64 2d 6f 6e 20 73 74 |window a|dd-on st|
|00003fe0| 72 75 63 74 75 72 65 20 | 2a 2f 0d 0d ff 00 c1 09 |ructure |*/......|
|00003ff0| 01 f7 23 64 65 66 69 6e | 65 ff 00 c1 09 00 f7 09 |..#defin|e.......|
|00004000| 57 69 6e 64 6f 77 53 74 | 72 75 63 74 09 ff 00 c1 |WindowSt|ruct....|
|00004010| 09 01 f7 73 74 72 75 63 | 74 ff 00 c1 09 00 f7 20 |...struc|t...... |
|00004020| 77 5f 73 74 72 75 63 74 | 0d 57 69 6e 64 6f 77 53 |w_struct|.WindowS|
|00004030| 74 72 75 63 74 0d 09 ff | 00 c1 09 01 f7 7b ff 00 |truct...|.....{..|
|00004040| c1 09 00 f7 0d 09 57 69 | 6e 64 6f 77 52 65 63 6f |......Wi|ndowReco|
|00004050| 72 64 09 77 72 3b 20 20 | 2f 2a 20 74 68 65 20 6f |rd.wr; |/* the o|
|00004060| 72 69 67 69 6e 61 6c 20 | 77 69 6e 64 6f 77 20 72 |riginal |window r|
|00004070| 65 63 6f 72 64 20 2a 2f | 0d 09 75 63 68 61 72 09 |ecord */|..uchar.|
|00004080| 09 6d 74 6f 70 3b 09 09 | 2f 2a 20 6d 61 72 67 69 |.mtop;..|/* margi|
|00004090| 6e 20 69 6e 64 65 6e 74 | 73 20 2a 2f 0d 02 8e 09 |n indent|s */....|
|000040a0| 75 63 68 61 72 09 09 6d | 6c 65 66 74 3b 0d 09 75 |uchar..m|left;..u|
|000040b0| 63 68 61 72 09 09 6d 62 | 6f 74 74 6f 6d 3b 0d 09 |char..mb|ottom;..|
|000040c0| 75 63 68 61 72 09 09 6d | 72 69 67 68 74 3b 0d 09 |uchar..m|right;..|
|000040d0| 52 65 63 74 09 09 09 63 | 75 72 73 72 74 3b 20 20 |Rect...c|ursrt; |
|000040e0| 20 20 2f 2a 20 75 73 65 | 64 20 66 6f 72 20 63 75 | /* use|d for cu|
|000040f0| 72 73 6f 72 20 63 6f 6e | 74 72 6f 6c 20 2a 2f 0d |rsor con|trol */.|
|00004100| 09 63 68 61 72 09 09 09 | 6d 6f 75 73 65 72 3b 09 |.char...|mouser;.|
|00004110| 2f 2a 20 6d 6f 75 73 65 | 20 70 6f 69 6e 74 65 72 |/* mouse| pointer|
|00004120| 20 69 64 20 20 2a 2f 0d | 09 63 68 61 72 09 09 09 | id */.|.char...|
|00004130| 63 68 61 6e 67 65 64 3b | 09 2f 2a 20 69 66 20 63 |changed;|./* if c|
|00004140| 6f 6e 74 65 6e 74 73 20 | 77 65 72 65 20 63 68 61 |ontents |were cha|
|00004150| 6e 67 65 64 20 2a 2f 0d | 09 6c 6f 6e 67 09 09 09 |nged */.|.long...|
|00004160| 63 6b 69 6e 64 3b 09 09 | 2f 2a 20 6b 69 6e 64 20 |ckind;..|/* kind |
|00004170| 6f 66 20 63 6f 6e 74 65 | 6e 74 73 20 2a 2f 0d 09 |of conte|nts */..|
|00004180| 73 68 6f 72 74 09 09 66 | 69 6c 65 72 65 66 3b 09 |short..f|ileref;.|
|00004190| 2f 2a 20 61 73 73 6f 63 | 69 61 74 65 64 20 66 69 |/* assoc|iated fi|
|000041a0| 6c 65 2c 20 69 66 20 61 | 6e 79 20 2a 2f 0d 09 54 |le, if a|ny */..T|
|000041b0| 45 48 61 6e 64 6c 65 09 | 63 75 72 74 65 78 74 3b |EHandle.|curtext;|
|000041c0| 09 2f 2a 20 68 61 6e 64 | 6c 65 20 74 6f 20 63 75 |./* hand|le to cu|
|000041d0| 72 72 65 6e 74 20 74 65 | 78 74 20 2a 2f 0d 09 ff |rrent te|xt */...|
|000041e0| 00 c1 09 01 f7 7d ff 00 | c1 09 00 f7 3b 0d 09 0d |.....}..|....;...|
|000041f0| 57 69 6e 64 6f 77 53 74 | 72 75 63 74 09 09 2a 57 |WindowSt|ruct..*W|
|00004200| 69 6e 64 6f 77 4e 65 77 | 28 29 3b 0d 0d ff 00 c1 |indowNew|();.....|
|00004210| 09 01 f7 23 64 65 66 69 | 6e 65 ff 00 c1 09 00 f7 |...#defi|ne......|
|00004220| 09 57 6f 66 66 73 65 74 | 09 31 38 0d ff 00 c1 09 |.Woffset|.18.....|
|00004230| 01 f7 23 64 65 66 69 6e | 65 ff 00 c1 09 00 f7 09 |..#defin|e.......|
|00004240| 53 42 61 72 57 69 64 74 | 68 20 31 35 0d 0d 2f 2a |SBarWidt|h 15../*|
|00004250| 20 74 68 65 73 65 20 64 | 65 66 69 6e 69 74 69 6f | these d|efinitio|
|00004260| 6e 73 20 61 6c 6c 6f 77 | 20 65 61 73 79 20 67 65 |ns allow| easy ge|
|00004270| 6e 65 72 61 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |neration| of the |
|00004280| 66 6f 75 72 20 73 71 75 | 61 72 65 20 63 6f 72 6e |four squ|are corn|
|00004290| 65 72 65 64 20 74 69 74 | 6c 65 64 20 77 69 6e 64 |ered tit|led wind|
|000042a0| 6f 77 73 2e 20 54 68 65 | 20 62 61 73 69 63 20 28 |ows. The| basic (|
|000042b0| 73 69 6d 70 6c 65 73 74 | 29 20 77 69 6e 64 6f 77 |simplest|) window|
|000042c0| 20 69 73 20 74 68 65 20 | 57 44 4f 43 20 28 4e 6f | is the |WDOC (No|
|000042d0| 47 72 6f 77 44 6f 63 50 | 72 6f 63 29 2e 20 54 6f |GrowDocP|roc). To|
|000042e0| 20 74 68 69 73 20 6f 70 | 74 69 6f 6e 61 6c 6c 79 | this op|tionally|
|000042f0| 20 61 64 64 20 57 47 52 | 4f 57 20 74 6f 20 61 64 | add WGR|OW to ad|
|00004300| 64 20 61 20 67 72 6f 77 | 20 62 6f 78 20 61 6e 64 |d a grow| box and|
|00004310| 2f 6f 72 20 57 5a 4f 4f | 4d 20 74 6f 20 61 64 64 |/or WZOO|M to add|
|00004320| 20 61 20 7a 6f 6f 6d 20 | 62 6f 78 2e 0d 02 35 20 | a zoom |box...5 |
|00004330| 2a 2f 0d ff 00 c1 09 01 | f7 23 64 65 66 69 6e 65 |*/......|.#define|
|00004340| ff 00 c1 09 00 f7 09 57 | 44 4f 43 09 09 34 0d ff |.......W|DOC..4..|
|00004350| 00 c1 09 01 f7 23 64 65 | 66 69 6e 65 ff 00 c1 09 |.....#de|fine....|
|00004360| 00 f7 09 57 47 52 4f 57 | 09 09 2d 34 0d ff 00 c1 |...WGROW|..-4....|
|00004370| 09 01 f7 23 64 65 66 69 | 6e 65 ff 00 c1 09 00 f7 |...#defi|ne......|
|00004380| 09 57 5a 4f 4f 4d 09 09 | 38 0d ff 00 c1 09 01 f7 |.WZOOM..|8.......|
|00004390| 23 64 65 66 69 6e 65 ff | 00 c1 09 00 f7 20 57 56 |#define.|..... WV|
|000043a0| 42 41 52 09 09 31 36 0d | ff 00 c1 09 01 f7 23 64 |BAR..16.|......#d|
|000043b0| 65 66 69 6e 65 ff 00 c1 | 09 00 f7 09 57 48 42 41 |efine...|....WHBA|
|000043c0| 52 09 09 33 32 0d 0d 2f | 2a 20 56 61 6c 75 65 20 |R..32../|* Value |
|000043d0| 70 6c 61 63 65 64 20 69 | 6e 20 77 69 6e 64 6f 77 |placed i|n window|
|000043e0| 4b 69 6e 64 20 66 69 65 | 6c 64 20 6f 66 20 57 69 |Kind fie|ld of Wi|
|000043f0| 6e 64 6f 77 52 65 63 6f | 72 64 20 62 79 20 57 69 |ndowReco|rd by Wi|
|00004400| 6e 64 6f 77 4e 65 77 20 | 69 66 20 74 68 65 20 77 |ndowNew |if the w|
|00004410| 69 6e 64 6f 77 20 68 61 | 73 20 61 20 67 72 6f 77 |indow ha|s a grow|
|00004420| 20 62 6f 78 2e 20 54 68 | 69 73 20 69 73 20 75 73 | box. Th|is is us|
|00004430| 65 64 20 62 79 20 72 6f | 75 74 69 6e 65 73 20 74 |ed by ro|utines t|
|00004440| 68 61 74 20 72 65 64 72 | 61 77 20 74 68 65 20 77 |hat redr|aw the w|
|00004450| 69 6e 64 6f 77 20 74 6f | 20 64 65 63 69 64 65 20 |indow to| decide |
|00004460| 77 68 65 74 68 65 72 20 | 74 6f 20 64 72 61 77 20 |whether |to draw |
|00004470| 74 68 65 20 67 72 6f 77 | 20 62 6f 78 20 6f 72 20 |the grow| box or |
|00004480| 6e 6f 74 20 0d 20 2a 2f | 0d ff 00 c1 09 01 f7 23 |not . */|.......#|
|00004490| 64 65 66 69 6e 65 ff 00 | c1 09 00 f7 09 48 41 53 |define..|.....HAS|
|000044a0| 47 52 4f 57 09 39 0d 0d | ff 00 c1 09 01 f7 23 65 |GROW.9..|......#e|
|000044b0| 6e 64 69 66 ff 00 c1 09 | 00 f7 0d 0d 2f 2a 20 63 |ndif....|..../* c|
|000044c0| 75 72 73 6f 72 68 65 6c | 70 2e 68 0d 20 2a 09 68 |ursorhel|p.h. *.h|
|000044d0| 65 61 64 65 72 20 66 69 | 6c 65 20 66 6f 72 20 63 |eader fi|le for c|
|000044e0| 75 72 73 6f 72 68 65 6c | 70 0d 20 2a 2f 0d 20 0d |ursorhel|p. */. .|
|000044f0| ff 00 c1 09 01 f7 20 23 | 64 65 66 69 6e 65 ff 00 |...... #|define..|
|00004500| c1 09 00 f7 09 41 52 52 | 4f 57 09 30 0d ff 00 c1 |.....ARR|OW.0....|
|00004510| 09 01 f7 20 23 64 65 66 | 69 6e 65 ff 00 c1 09 00 |... #def|ine.....|
|00004520| f7 09 49 42 45 41 4d 09 | 31 0d ff 00 c1 09 01 f7 |..IBEAM.|1.......|
|00004530| 20 23 64 65 66 69 6e 65 | ff 00 c1 09 00 f7 09 43 | #define|.......C|
|00004540| 52 4f 53 53 09 32 0d ff | 00 c1 09 01 f7 20 23 64 |ROSS.2..|..... #d|
|00004550| 65 66 69 6e 65 ff 00 c1 | 09 00 f7 09 50 4c 55 53 |efine...|....PLUS|
|00004560| 09 09 33 0d 02 29 ff 00 | c1 09 01 f7 20 23 64 65 |..3..)..|.... #de|
|00004570| 66 69 6e 65 ff 00 c1 09 | 00 f7 09 57 41 54 43 48 |fine....|...WATCH|
|00004580| 09 34 ff 00 14 0a 00 f7 | 0d fc 00 48 01 44 00 5a |.4......|...H.D.Z|
|00004590| 01 0c 01 b0 02 40 f7 20 | 0d fc 00 48 01 44 00 5a |.....@. |...H.D.Z|
|000045a0| 02 0c 01 b0 02 40 f7 ff | 00 15 0a 01 f7 43 75 72 |.....@..|.....Cur|
|000045b0| 73 6f 72 48 65 6c 70 20 | 46 75 6e 63 74 69 6f 6e |sorHelp |Function|
|000045c0| 73 0d fc 00 48 01 44 00 | 48 00 09 01 44 01 68 01 |s...H.D.|H...D.h.|
|000045d0| 8c 01 b0 01 d4 01 f0 08 | 02 1c 02 40 02 64 02 88 |........|...@.d..|
|000045e0| 02 ac 02 d0 02 f0 04 03 | 18 03 3c 03 60 03 84 03 |........|..<.`...|
|000045f0| a8 03 cc 03 f0 00 f7 ff | 00 14 0a 00 f7 ff 00 c1 |........|........|
|00004600| 09 01 f7 23 69 6e 63 6c | 75 64 65 ff 00 c1 09 00 |...#incl|ude.....|
|00004610| f7 09 22 61 62 63 2e 68 | 22 0d ff 00 c1 09 01 f7 |.."abc.h|".......|
|00004620| 23 69 6e 63 6c 75 64 65 | ff 00 c1 09 00 f7 09 22 |#include|......."|
|00004630| 51 75 69 63 6b 64 72 61 | 77 2e 68 22 0d ff 00 c1 |Quickdra|w.h"....|
|00004640| 09 01 f7 23 69 6e 63 6c | 75 64 65 ff 00 c1 09 00 |...#incl|ude.....|
|00004650| f7 09 22 77 69 6e 64 6f | 77 4d 67 72 2e 68 22 0d |.."windo|wMgr.h".|
|00004660| ff 00 c1 09 01 f7 23 69 | 6e 63 6c 75 64 65 ff 00 |......#i|nclude..|
|00004670| c1 09 00 f7 09 22 77 69 | 6e 64 6f 77 68 65 6c 70 |....."wi|ndowhelp|
|00004680| 2e 68 22 0d ff 00 c1 09 | 01 f7 23 69 6e 63 6c 75 |.h".....|..#inclu|
|00004690| 64 65 ff 00 c1 09 00 f7 | 09 22 63 75 72 73 6f 72 |de......|."cursor|
|000046a0| 68 65 6c 70 2e 68 22 0d | 0d 2f 2a 20 43 75 72 73 |help.h".|./* Curs|
|000046b0| 6f 72 4d 61 69 6e 74 61 | 69 6e 0d 20 2a 0d 20 2a |orMainta|in. *. *|
|000046c0| 20 41 64 6a 75 73 74 73 | 20 74 68 65 20 63 75 72 | Adjusts| the cur|
|000046d0| 73 6f 72 20 61 63 63 6f | 72 64 69 6e 67 20 74 6f |sor acco|rding to|
|000046e0| 20 74 68 65 20 76 61 6c | 75 65 0d 20 2a 20 73 65 | the val|ue. * se|
|000046f0| 74 20 69 6e 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |t in the| window |
|00004700| 61 6e 64 20 74 68 65 20 | 72 65 63 74 61 6e 67 6c |and the |rectangl|
|00004710| 65 20 63 75 72 72 65 63 | 74 2e 0d 20 2a 20 49 66 |e currec|t.. * If|
|00004720| 20 74 68 65 20 6d 6f 75 | 73 65 20 69 73 20 69 6e | the mou|se is in|
|00004730| 20 74 68 65 20 72 65 63 | 74 61 6e 67 6c 65 2c 20 | the rec|tangle, |
|00004740| 74 68 65 20 63 75 72 73 | 6f 72 20 0d 20 2a 20 73 |the curs|or . * s|
|00004750| 65 74 20 74 6f 20 74 68 | 65 20 63 75 72 72 65 6e |et to th|e curren|
|00004760| 74 20 63 75 72 73 6f 72 | 2c 20 6f 74 68 65 72 77 |t cursor|, otherw|
|00004770| 69 73 65 20 69 74 20 69 | 73 0d 20 2a 20 73 65 74 |ise it i|s. * set|
|00004780| 20 74 6f 20 74 68 65 20 | 61 72 72 6f 77 2e 0d 02 | to the |arrow...|
|00004790| 4c 20 2a 0d 20 2a 20 54 | 68 65 20 69 66 20 73 74 |L *. * T|he if st|
|000047a0| 61 74 65 6d 65 6e 74 20 | 63 68 65 63 6b 73 20 74 |atement |checks t|
|000047b0| 6f 20 73 65 65 20 69 66 | 20 74 68 65 72 65 20 69 |o see if| there i|
|000047c0| 73 20 61 20 0d 20 2a 20 | 76 61 6c 69 64 20 77 69 |s a . * |valid wi|
|000047d0| 6e 64 6f 77 20 61 6e 64 | 20 69 66 20 74 68 65 20 |ndow and| if the |
|000047e0| 77 69 6e 64 6f 77 20 62 | 65 6c 6f 6e 67 73 20 74 |window b|elongs t|
|000047f0| 6f 20 74 68 65 0d 20 2a | 20 61 70 70 6c 69 63 61 |o the. *| applica|
|00004800| 74 69 6f 6e 2e 20 49 66 | 20 69 74 20 64 6f 65 73 |tion. If| it does|
|00004810| 20 6e 6f 74 20 62 65 6c | 6f 6e 67 20 74 6f 20 74 | not bel|ong to t|
|00004820| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 0d 20 |he appli|cation. |
|00004830| 2a 20 69 74 20 69 73 20 | 61 20 44 41 2e 20 49 66 |* it is |a DA. If|
|00004840| 20 74 68 65 20 44 41 20 | 69 73 20 63 6f 6e 74 72 | the DA |is contr|
|00004850| 6f 6c 6c 69 6e 67 20 74 | 68 65 20 63 75 72 73 6f |olling t|he curso|
|00004860| 72 2c 20 74 68 65 72 65 | 0d 20 2a 20 77 69 6c 6c |r, there|. * will|
|00004870| 20 62 65 20 61 20 63 6f | 6e 66 6c 69 63 74 20 61 | be a co|nflict a|
|00004880| 73 20 62 6f 74 68 20 70 | 72 6f 67 72 61 6d 73 20 |s both p|rograms |
|00004890| 61 74 74 65 6d 70 74 20 | 74 6f 20 63 6f 6e 74 72 |attempt |to contr|
|000048a0| 6f 6c 0d 20 2a 20 69 74 | 2e 0d 20 2a 0d 20 2a 2f |ol. * it|.. *. */|
|000048b0| 0d 43 75 72 73 6f 72 4d | 61 69 6e 74 61 69 6e 28 |.CursorM|aintain(|
|000048c0| 77 73 29 0d 09 57 69 6e | 64 6f 77 53 74 72 75 63 |ws)..Win|dowStruc|
|000048d0| 74 09 2a 77 73 3b 0d ff | 00 c1 09 01 f7 7b ff 00 |t.*ws;..|.....{..|
|000048e0| c1 09 00 f7 0d 09 50 6f | 69 6e 74 09 09 09 70 74 |......Po|int...pt|
|000048f0| 3b 0d 09 43 75 72 73 48 | 61 6e 64 6c 65 09 09 63 |;..CursH|andle..c|
|00004900| 75 72 73 3b 0d 09 73 68 | 6f 72 74 09 09 09 63 75 |urs;..sh|ort...cu|
|00004910| 72 63 75 72 73 6f 72 3b | 20 2f 2a 20 63 75 72 72 |rcursor;| /* curr|
|00004920| 65 6e 74 20 63 75 72 73 | 6f 72 20 2a 2f 0d 09 0d |ent curs|or */...|
|00004930| 09 ff 00 c1 09 01 f7 69 | 66 ff 00 c1 09 00 f7 20 |.......i|f...... |
|00004940| 28 77 73 20 26 26 20 28 | 28 28 57 69 6e 64 6f 77 |(ws && (|((Window|
|00004950| 52 65 63 6f 72 64 20 2a | 29 77 73 29 2d 3e 77 69 |Record *|)ws)->wi|
|00004960| 6e 64 6f 77 4b 69 6e 64 | 20 3e 20 37 29 20 29 0d |ndowKind| > 7) ).|
|00004970| 09 09 ff 00 c1 09 01 f7 | 7b ff 00 c1 09 00 f7 0d |........|{.......|
|00004980| 09 09 47 65 74 4d 6f 75 | 73 65 28 26 70 74 29 3b |..GetMou|se(&pt);|
|00004990| 0d 09 09 63 75 72 63 75 | 72 73 6f 72 20 3d 20 77 |...curcu|rsor = w|
|000049a0| 73 2d 3e 6d 6f 75 73 65 | 72 3b 20 20 2f 2a 20 63 |s->mouse|r; /* c|
|000049b0| 75 72 73 6f 72 20 6b 69 | 6e 64 20 69 73 20 73 74 |ursor ki|nd is st|
|000049c0| 6f 72 65 64 20 69 6e 20 | 74 68 65 20 77 69 6e 64 |ored in |the wind|
|000049d0| 6f 77 20 73 74 72 75 63 | 74 20 2a 2f 0d 02 64 09 |ow struc|t */..d.|
|000049e0| 09 ff 00 c1 09 01 f7 69 | 66 ff 00 c1 09 00 f7 20 |.......i|f...... |
|000049f0| 28 28 50 74 49 6e 52 65 | 63 74 28 70 74 2c 20 26 |((PtInRe|ct(pt, &|
|00004a00| 28 77 73 2d 3e 63 75 72 | 73 72 74 29 29 29 20 26 |(ws->cur|srt))) &|
|00004a10| 26 20 28 63 75 72 63 75 | 72 73 6f 72 29 29 0d 09 |& (curcu|rsor))..|
|00004a20| 09 09 ff 00 c1 09 01 f7 | 7b ff 00 c1 09 00 f7 0d |........|{.......|
|00004a30| 09 09 09 63 75 72 73 20 | 3d 20 28 43 75 72 73 6f |...curs |= (Curso|
|00004a40| 72 20 2a 2a 29 47 65 74 | 43 75 72 73 6f 72 28 63 |r **)Get|Cursor(c|
|00004a50| 75 72 63 75 72 73 6f 72 | 29 3b 09 0d 09 09 09 53 |urcursor|);.....S|
|00004a60| 65 74 43 75 72 73 6f 72 | 28 2a 63 75 72 73 29 3b |etCursor|(*curs);|
|00004a70| 20 0d 09 09 09 ff 00 c1 | 09 01 f7 7d ff 00 c1 09 | .......|...}....|
|00004a80| 00 f7 0d 09 09 ff 00 c1 | 09 01 f7 65 6c 73 65 ff |........|...else.|
|00004a90| 00 c1 09 00 f7 20 ff 00 | c1 09 01 f7 69 66 ff 00 |..... ..|....if..|
|00004aa0| c1 09 00 f7 20 28 63 75 | 72 63 75 72 73 6f 72 20 |.... (cu|rcursor |
|00004ab0| 21 3d 20 57 41 54 43 48 | 29 0d 09 09 09 ff 00 c1 |!= WATCH|).......|
|00004ac0| 09 01 f7 7b ff 00 c1 09 | 00 f7 0d 09 09 09 49 6e |...{....|......In|
|00004ad0| 69 74 43 75 72 73 6f 72 | 28 29 3b 0d 09 09 09 ff |itCursor|();.....|
|00004ae0| 00 c1 09 01 f7 7d ff 00 | c1 09 00 f7 0d 09 09 ff |.....}..|........|
|00004af0| 00 c1 09 01 f7 7d ff 00 | c1 09 00 f7 0d 09 ff 00 |.....}..|........|
|00004b00| c1 09 01 f7 69 66 ff 00 | c1 09 00 f7 20 28 77 73 |....if..|.... (ws|
|00004b10| 20 3d 3d 20 4e 49 4c 29 | 0d 09 09 49 6e 69 74 43 | == NIL)|...InitC|
|00004b20| 75 72 73 6f 72 28 29 3b | 0d ff 00 c1 09 01 f7 7d |ursor();|.......}|
|00004b30| ff 00 c1 09 00 f7 0d 0d | 2f 2a 20 43 75 72 73 6f |........|/* Curso|
|00004b40| 72 52 65 63 74 0d 20 2a | 0d 20 2a 20 55 73 65 73 |rRect. *|. * Uses|
|00004b50| 20 74 68 65 20 70 6f 72 | 74 52 65 63 74 20 6f 66 | the por|tRect of|
|00004b60| 20 74 68 65 20 77 69 6e | 64 6f 77 20 70 61 73 73 | the win|dow pass|
|00004b70| 65 64 20 69 6e 0d 20 2a | 20 74 6f 20 73 65 74 20 |ed in. *| to set |
|00004b80| 74 68 65 20 63 75 72 72 | 65 6e 74 20 72 65 63 74 |the curr|ent rect|
|00004b90| 61 6e 67 6c 65 2e 20 20 | 41 64 6a 75 73 74 73 20 |angle. |Adjusts |
|00004ba0| 74 68 65 20 73 69 7a 65 | 0d 20 2a 20 6f 66 20 74 |the size|. * of t|
|00004bb0| 68 65 20 72 65 63 74 61 | 6e 67 6c 65 20 74 6f 20 |he recta|ngle to |
|00004bc0| 61 63 63 6f 75 6e 74 20 | 66 6f 72 20 77 69 6e 64 |account |for wind|
|00004bd0| 6f 77 20 6d 61 72 67 69 | 6e 73 2e 0d 20 2a 0d 20 |ow margi|ns.. *. |
|00004be0| 2a 0d 20 2a 20 42 79 20 | 6b 65 65 70 69 6e 67 20 |*. * By |keeping |
|00004bf0| 74 68 65 20 72 65 63 74 | 61 6e 67 6c 65 20 61 72 |the rect|angle ar|
|00004c00| 6f 75 6e 64 2c 20 77 65 | 20 65 6c 69 6d 69 6e 61 |ound, we| elimina|
|00004c10| 74 65 20 64 6f 69 6e 67 | 0d 20 2a 20 74 68 69 73 |te doing|. * this|
|00004c20| 20 65 61 63 68 20 74 69 | 6d 65 20 74 68 72 6f 75 | each ti|me throu|
|00004c30| 67 68 20 74 68 65 20 65 | 76 65 6e 74 20 6c 6f 6f |gh the e|vent loo|
|00004c40| 70 2e 0d 02 15 20 2a 2f | 0d 20 0d 43 75 72 73 6f |p.... */|. .Curso|
|00004c50| 72 52 65 63 74 28 77 73 | 29 0d 09 57 69 6e 64 6f |rRect(ws|)..Windo|
|00004c60| 77 53 74 72 75 63 74 09 | 09 2a 77 73 3b 0d ff 00 |wStruct.|.*ws;...|
|00004c70| c1 09 01 f7 7b ff 00 c1 | 09 00 f7 0d 09 77 73 2d |....{...|.....ws-|
|00004c80| 3e 63 75 72 73 72 74 20 | 3d 20 28 28 47 72 61 66 |>cursrt |= ((Graf|
|00004c90| 50 6f 72 74 20 2a 29 77 | 73 29 2d 3e 70 6f 72 74 |Port *)w|s)->port|
|00004ca0| 52 65 63 74 3b 0d 09 41 | 64 6a 75 73 74 52 65 63 |Rect;..A|djustRec|
|00004cb0| 74 28 26 28 77 73 2d 3e | 63 75 72 73 72 74 29 2c |t(&(ws->|cursrt),|
|00004cc0| 77 73 2d 3e 6d 74 6f 70 | 2c 77 73 2d 3e 6d 6c 65 |ws->mtop|,ws->mle|
|00004cd0| 66 74 2c 77 73 2d 3e 6d | 62 6f 74 74 6f 6d 2c 77 |ft,ws->m|bottom,w|
|00004ce0| 73 2d 3e 6d 72 69 67 68 | 74 29 3b 0d ff 00 c1 09 |s->mrigh|t);.....|
|00004cf0| 01 f7 7d ff 00 c1 09 00 | f7 0d 0d 2f 2a 20 43 75 |..}.....|.../* Cu|
|00004d00| 72 73 6f 72 54 6f 55 73 | 65 0d 20 2a 0d 20 2a 20 |rsorToUs|e. *. * |
|00004d10| 53 65 74 73 20 74 68 65 | 20 63 75 72 73 6f 72 20 |Sets the| cursor |
|00004d20| 74 6f 20 62 65 20 64 69 | 73 70 6c 61 79 65 64 20 |to be di|splayed |
|00004d30| 69 6e 20 74 68 65 0d 20 | 2a 20 72 65 63 74 61 6e |in the. |* rectan|
|00004d40| 67 6c 65 20 6f 66 20 74 | 68 65 20 63 75 72 72 65 |gle of t|he curre|
|00004d50| 6e 74 20 77 69 6e 64 6f | 77 2e 0d 20 2a 0d 20 2a |nt windo|w.. *. *|
|00004d60| 20 45 69 74 68 65 72 20 | 70 61 73 73 20 61 20 70 | Either |pass a p|
|00004d70| 6f 69 6e 74 65 72 20 74 | 6f 20 74 68 65 20 77 69 |ointer t|o the wi|
|00004d80| 6e 64 6f 77 20 73 74 72 | 75 63 74 0d 20 2a 20 6f |ndow str|uct. * o|
|00004d90| 72 20 61 20 4e 55 4c 4c | 20 70 6f 69 6e 74 65 72 |r a NULL| pointer|
|00004da0| 2e 20 49 66 20 61 20 4e | 55 4c 4c 20 70 6f 69 6e |. If a N|ULL poin|
|00004db0| 74 65 72 20 69 73 20 70 | 61 73 73 65 64 2c 0d 20 |ter is p|assed,. |
|00004dc0| 2a 20 43 75 72 73 6f 72 | 54 6f 55 73 65 28 29 20 |* Cursor|ToUse() |
|00004dd0| 77 69 6c 6c 20 75 73 65 | 20 74 68 65 20 66 72 6f |will use| the fro|
|00004de0| 6e 74 20 77 69 6e 64 6f | 77 2e 0d 20 2a 20 0d 20 |nt windo|w.. * . |
|00004df0| 2a 20 4e 6f 74 65 3a 20 | 41 74 20 6c 65 61 73 74 |* Note: |At least|
|00004e00| 20 6f 6e 65 20 77 69 6e | 64 6f 77 20 6d 75 73 74 | one win|dow must|
|00004e10| 20 65 78 69 73 74 20 66 | 6f 72 20 74 68 69 73 0d | exist f|or this.|
|00004e20| 20 2a 09 74 6f 20 77 6f | 72 6b 2c 20 62 75 74 20 | *.to wo|rk, but |
|00004e30| 69 66 20 6e 6f 20 77 69 | 6e 64 6f 77 73 20 65 78 |if no wi|ndows ex|
|00004e40| 69 73 74 2c 20 69 74 0d | 20 2a 09 77 69 6c 6c 20 |ist, it.| *.will |
|00004e50| 6e 6f 74 20 68 75 72 74 | 2e 0d 02 bf 20 2a 2f 0d |not hurt|.... */.|
|00004e60| 43 75 72 73 6f 72 54 6f | 55 73 65 28 77 73 2c 63 |CursorTo|Use(ws,c|
|00004e70| 29 0d 09 57 69 6e 64 6f | 77 53 74 72 75 63 74 09 |)..Windo|wStruct.|
|00004e80| 2a 77 73 3b 09 2f 2a 20 | 77 69 6e 64 6f 77 20 73 |*ws;./* |window s|
|00004e90| 74 72 75 63 74 20 74 6f | 20 73 65 74 20 63 75 72 |truct to| set cur|
|00004ea0| 73 6f 72 20 66 6f 72 20 | 2a 2f 0d 09 73 68 6f 72 |sor for |*/..shor|
|00004eb0| 74 09 09 09 09 63 3b 09 | 09 2f 2a 20 63 75 72 73 |t....c;.|./* curs|
|00004ec0| 6f 72 20 63 6f 64 65 20 | 74 6f 20 75 73 65 20 2a |or code |to use *|
|00004ed0| 2f 0d ff 00 c1 09 01 f7 | 7b ff 00 c1 09 00 f7 0d |/.......|{.......|
|00004ee0| 09 ff 00 c1 09 01 f7 69 | 66 ff 00 c1 09 00 f7 20 |.......i|f...... |
|00004ef0| 28 21 77 73 29 0d 09 09 | 77 73 20 3d 20 28 57 69 |(!ws)...|ws = (Wi|
|00004f00| 6e 64 6f 77 53 74 72 75 | 63 74 20 2a 29 46 72 6f |ndowStru|ct *)Fro|
|00004f10| 6e 74 57 69 6e 64 6f 77 | 28 29 3b 0d 09 ff 00 c1 |ntWindow|();.....|
|00004f20| 09 01 f7 69 66 ff 00 c1 | 09 00 f7 20 28 77 73 29 |...if...|... (ws)|
|00004f30| 0d 20 09 09 77 73 2d 3e | 6d 6f 75 73 65 72 20 3d |. ..ws->|mouser =|
|00004f40| 20 63 3b 0d ff 00 c1 09 | 01 f7 7d ff 00 14 0a 00 | c;.....|..}.....|
|00004f50| f7 0d fc 00 48 01 44 00 | 5a 01 0c 01 b0 02 40 f7 |....H.D.|Z.....@.|
|00004f60| 20 0d fc 00 48 01 44 00 | 5a 02 0c 01 b0 02 40 f7 | ...H.D.|Z.....@.|
|00004f70| ff 00 15 0a 01 f7 55 73 | 69 6e 67 20 43 75 72 73 |......Us|ing Curs|
|00004f80| 6f 72 4d 61 69 6e 74 61 | 69 6e 28 29 ff 00 14 0a |orMainta|in()....|
|00004f90| 00 f7 0d fc 00 48 01 44 | 00 5a 01 0c 01 b0 02 40 |.....H.D|.Z.....@|
|00004fa0| f7 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 66 |.The fol|lowing f|
|00004fb0| 72 61 67 6d 65 6e 74 20 | 73 68 6f 77 73 20 74 68 |ragment |shows th|
|00004fc0| 65 20 63 61 6c 6c 20 74 | 6f 20 43 75 72 73 6f 72 |e call t|o Cursor|
|00004fd0| 4d 61 69 6e 74 61 69 6e | 28 29 20 69 6e 20 74 68 |Maintain|() in th|
|00004fe0| 65 20 6d 61 69 6e 20 65 | 76 65 6e 74 20 6c 6f 6f |e main e|vent loo|
|00004ff0| 70 2e 0d 0d fc 00 48 01 | 44 00 48 00 09 01 44 01 |p.....H.|D.H...D.|
|00005000| 68 01 8c 01 b0 01 d4 01 | f0 08 02 1c 02 40 02 64 |h.......|.....@.d|
|00005010| f7 ff 00 c1 09 00 f7 45 | 76 65 6e 74 4c 6f 6f 70 |.......E|ventLoop|
|00005020| 28 29 0d ff 00 c1 09 01 | f7 7b ff 00 c1 09 00 f7 |()......|.{......|
|00005030| 0d 09 45 76 65 6e 74 52 | 65 63 6f 72 64 09 09 74 |..EventR|ecord..t|
|00005040| 68 65 45 76 65 6e 74 3b | 0d 09 63 68 61 72 09 09 |heEvent;|..char..|
|00005050| 09 63 3b 0d 09 73 68 6f | 72 74 09 09 09 77 69 6e |.c;..sho|rt...win|
|00005060| 64 6f 77 63 6f 64 65 3b | 0d 09 57 69 6e 64 6f 77 |dowcode;|..Window|
|00005070| 50 74 72 09 09 77 70 3b | 0d 09 57 69 6e 64 6f 77 |Ptr..wp;|..Window|
|00005080| 53 74 72 75 63 74 09 2a | 77 73 3b 0d 09 0d 09 ff |Struct.*|ws;.....|
|00005090| 00 c1 09 01 f7 77 68 69 | 6c 65 ff 00 c1 09 00 f7 |.....whi|le......|
|000050a0| 28 54 72 75 65 29 0d 09 | 09 ff 00 c1 09 01 f7 7b |(True)..|.......{|
|000050b0| ff 00 c1 09 00 f7 0d 09 | 09 77 70 20 3d 20 46 72 |........|.wp = Fr|
|000050c0| 6f 6e 74 57 69 6e 64 6f | 77 28 29 3b 0d 09 09 53 |ontWindo|w();...S|
|000050d0| 79 73 74 65 6d 54 61 73 | 6b 28 29 3b 0d 09 09 43 |ystemTas|k();...C|
|000050e0| 75 72 73 6f 72 4d 61 69 | 6e 74 61 69 6e 28 77 70 |ursorMai|ntain(wp|
|000050f0| 29 3b 09 0d 09 09 ff 00 | c1 09 01 f7 69 66 ff 00 |);......|....if..|
|00005100| c1 09 00 f7 20 28 77 70 | 29 0d 09 09 09 ff 00 c1 |.... (wp|).......|
|00005110| 09 01 f7 7b ff 00 c1 09 | 00 f7 0d 02 a3 09 09 09 |...{....|........|
|00005120| 41 70 70 54 61 73 6b 28 | 77 70 29 3b 0d 09 09 09 |AppTask(|wp);....|
|00005130| ff 00 c1 09 01 f7 7d ff | 00 c1 09 00 f7 09 09 0d |......}.|........|
|00005140| 09 09 ff 00 c1 09 01 f7 | 69 66 ff 00 c1 09 00 f7 |........|if......|
|00005150| 20 28 47 65 74 4e 65 78 | 74 45 76 65 6e 74 28 65 | (GetNex|tEvent(e|
|00005160| 76 65 72 79 45 76 65 6e | 74 2c 26 74 68 65 45 76 |veryEven|t,&theEv|
|00005170| 65 6e 74 29 29 0d 09 09 | 09 ff 00 c1 09 01 f7 73 |ent))...|.......s|
|00005180| 77 69 74 63 68 ff 00 c1 | 09 00 f7 28 74 68 65 45 |witch...|...(theE|
|00005190| 76 65 6e 74 2e 77 68 61 | 74 29 ff 00 14 0a 00 f7 |vent.wha|t)......|
|000051a0| 0d fc 00 48 01 44 00 5a | 01 0c 01 b0 02 40 f7 09 |...H.D.Z|.....@..|
|000051b0| 0d fc 00 48 01 44 00 5a | 02 0c 01 b0 02 40 f7 ff |...H.D.Z|.....@..|
|000051c0| 00 15 0a 01 f7 4f 74 68 | 65 72 20 43 6f 6d 6d 65 |.....Oth|er Comme|
|000051d0| 6e 74 73 ff 00 14 0a 00 | f7 0d fc 00 48 01 44 00 |nts.....|....H.D.|
|000051e0| 5a 01 0c 01 b0 02 40 f7 | 43 68 65 63 6b 20 4a 6f |Z.....@.|Check Jo|
|000051f0| 68 6e 20 4e 61 69 72 6e | d5 73 20 61 72 74 69 63 |hn Nairn|.s artic|
|00005200| 6c 65 20 66 6f 72 20 6f | 74 68 65 72 20 74 68 69 |le for o|ther thi|
|00005210| 6e 67 73 20 74 6f 20 64 | 6f 20 74 6f 20 61 75 74 |ngs to d|o to aut|
|00005220| 6f 6d 61 74 65 20 63 75 | 72 73 6f 72 20 63 6f 6e |omate cu|rsor con|
|00005230| 74 72 6f 6c 2e 20 59 6f | 75 20 77 69 6c 6c 20 6e |trol. Yo|u will n|
|00005240| 6f 74 65 20 68 65 20 63 | 68 65 63 6b 73 20 66 6f |ote he c|hecks fo|
|00005250| 72 20 63 65 72 74 61 69 | 6e 20 6b 65 79 73 20 62 |r certai|n keys b|
|00005260| 65 69 6e 67 20 70 72 65 | 73 73 65 64 20 74 6f 20 |eing pre|ssed to |
|00005270| 63 68 61 6e 67 65 20 74 | 68 65 20 63 75 72 73 6f |change t|he curso|
|00005280| 72 20 74 6f 20 61 6c 6c | 6f 77 20 77 69 6e 64 6f |r to all|ow windo|
|00005290| 77 20 73 63 72 6f 6c 6c | 69 6e 67 20 28 65 2e 67 |w scroll|ing (e.g|
|000052a0| 2e 20 77 69 74 68 20 61 | 20 68 61 6e 64 29 2e 20 |. with a| hand). |
|000052b0| 0d 0d fc 00 48 01 44 00 | 5a 02 0c 01 b0 02 40 f7 |....H.D.|Z.....@.|
|000052c0| ff 00 15 0a 01 f7 4c 61 | 73 74 20 54 69 6d 65 ff |......La|st Time.|
|000052d0| 00 14 0a 00 f7 0d fc 00 | 48 01 44 00 5a 01 0c 01 |........|H.D.Z...|
|000052e0| b0 02 40 f7 49 20 68 61 | 76 65 20 61 20 6d 69 6e |..@.I ha|ve a min|
|000052f0| 6f 72 20 65 72 72 6f 72 | 20 69 6e 20 4a 75 6e 65 |or error| in June|
|00005300| d5 73 20 63 6f 6c 75 6d | 6e 2e 20 49 20 69 6e 63 |.s colum|n. I inc|
|00005310| 6c 75 64 65 64 20 73 6f | 6d 65 20 73 70 61 63 65 |luded so|me space|
|00005320| 20 69 6e 20 74 68 65 20 | 77 69 6e 64 6f 77 20 73 | in the |window s|
|00005330| 74 72 75 63 74 75 72 65 | 20 74 6f 20 68 61 6e 64 |tructure| to hand|
|00005340| 6c 65 20 77 69 6e 64 6f | 77 20 7a 6f 6f 6d 69 6e |le windo|w zoomin|
|00005350| 67 2e 20 54 68 65 73 65 | 20 61 72 65 20 6e 6f 74 |g. These| are not|
|00005360| 20 6e 65 65 64 65 64 20 | 61 73 20 7a 6f 6f 6d 69 | needed |as zoomi|
|00005370| 6e 67 20 69 73 20 66 75 | 6c 6c 79 20 73 75 70 70 |ng is fu|lly supp|
|00005380| 6f 72 74 65 64 20 62 79 | 20 74 68 65 20 4d 61 63 |orted by| the Mac|
|00005390| 20 54 6f 6f 6c 62 6f 78 | 2e 20 49 20 68 61 64 6e | Toolbox|. I hadn|
|000053a0| d5 74 20 75 73 65 64 20 | 74 68 65 6d 20 66 6f 72 |.t used |them for|
|000053b0| 20 61 6e 79 74 68 69 6e | 67 20 79 65 74 2e 20 0d | anythin|g yet. .|
|000053c0| 00 e0 0d fc 00 48 01 44 | 00 5a 02 0c 01 b0 02 40 |.....H.D|.Z.....@|
|000053d0| f7 ff 00 15 0a 01 f7 4e | 65 78 74 20 54 69 6d 65 |.......N|ext Time|
|000053e0| ff 00 14 0a 00 f7 0d fc | 00 48 01 44 00 5a 01 0c |........|.H.D.Z..|
|000053f0| 01 b0 02 40 f7 4e 65 78 | 74 20 74 69 6d 65 20 49 |...@.Nex|t time I|
|00005400| 20 61 6d 20 67 6f 69 6e | 67 20 74 6f 20 73 68 6f | am goin|g to sho|
|00005410| 77 20 61 20 71 75 69 63 | 6b 20 61 6e 64 20 76 65 |w a quic|k and ve|
|00005420| 72 79 20 64 69 72 74 79 | 20 77 61 79 20 74 6f 20 |ry dirty| way to |
|00005430| 68 65 6c 70 20 64 65 61 | 6c 20 77 69 74 68 20 6d |help dea|l with m|
|00005440| 65 6e 75 73 2e 20 0d 50 | 2e 53 2e 20 43 6f 6d 6d |enus. .P|.S. Comm|
|00005450| 65 6e 74 73 20 61 72 65 | 20 77 65 6c 63 6f 6d 65 |ents are| welcome|
|00005460| 2e 20 53 65 6e 64 20 79 | 6f 75 72 20 6e 6f 74 65 |. Send y|our note|
|00005470| 73 20 74 6f 20 4d 61 63 | 54 75 74 6f 72 2c 20 61 |s to Mac|Tutor, a|
|00005480| 6e 64 20 70 6c 65 61 73 | 65 20 69 6e 63 6c 75 64 |nd pleas|e includ|
|00005490| 65 20 61 20 70 68 6f 6e | 65 20 6e 75 6d 62 65 72 |e a phon|e number|
|000054a0| 2e 0d 00 66 64 00 2a 6e | 00 78 0c 00 2c a1 00 b4 |...fd.*n|.x..,...|
|000054b0| 04 00 30 18 00 6c 64 00 | 32 22 00 d8 0c 00 35 a4 |..0..ld.|2"....5.|
|000054c0| 00 78 64 00 37 e7 00 e4 | 04 00 3c 2c 00 84 64 00 |.xd.7...|..<,..d.|
|000054d0| 3e 7d 00 ae 24 00 40 9d | 00 e1 24 00 43 2d 00 d8 |>}..$.@.|..$.C-..|
|000054e0| 64 00 45 64 00 98 24 00 | 47 8f 00 bd 24 00 49 dd |d.Ed..$.|G...$.I.|
|000054f0| 00 d8 24 00 4c 43 00 c6 | 64 00 4e 5a 01 28 64 00 |..$.LC..|d.NZ.(d.|
|00005500| 51 1b 00 b6 6c 00 53 c0 | 00 48 00 0c 04 00 29 52 |Q...l.S.|.H....)R|
|00005510| 00 40 04 00 29 58 00 40 | 00 00 01 0e 01 10 a0 6b |.@..)X.@|.......k|
|00005520| 65 b2 28 b0 ec 41 10 df | e1 60 94 6a b1 e4 b6 af |e.(..A..|.`.j....|
|00005530| 38 1c a7 13 8c 1a 84 b2 | cf 93 70 6f 74 6d f5 55 |8.......|..potm.U|
|00005540| af 04 34 2e 1f bc 41 8a | 40 52 7d a7 f1 d0 1a 2f |..4...A.|@R}..../|
|00005550| ac d0 f7 6c 8f ef 85 1d | de e6 ec 8d a1 84 2f 41 |...l....|....../A|
|00005560| af f5 f7 9c de a4 52 4f | ab f5 23 7e ba 33 f6 6d |......RO|..#~.3.m|
|00005570| 98 c3 00 00 72 77 30 43 | 74 54 74 63 65 72 e1 1b |....rw0C|tTtcer..|
|00005580| 45 95 02 80 b9 8a 79 58 | af 93 2d 1d da 2b d1 c5 |E.....yX|..-..+..|
|00005590| 40 c1 d7 0f bb 01 90 af | 59 85 63 6f 64 77 1a 4a |@.......|Y.codw.J|
|000055a0| 5d 34 5d 05 df e5 1f 92 | 23 c7 30 3d 87 56 30 3d |]4].....|#.0=.V0=|
|000055b0| 79 56 46 d1 78 3b 74 f2 | 95 d5 e8 60 0b 9d 11 88 |yVF.x;t.|...`....|
|000055c0| 0b b9 38 08 25 a0 90 6c | 4a b3 f3 74 f2 1c 00 00 |..8.%..l|J..t....|
|000055d0| 73 77 9e e6 e8 5f db 65 | 04 0b 79 b8 03 7d 6a c5 |sw..._.e|..y..}j.|
|000055e0| 85 db db 66 f4 0f db 66 | f4 1b c7 3d 69 09 70 ce |...f...f|...=i.p.|
|000055f0| 80 db a9 85 7c d0 ab 9a | 7e a0 02 72 ab 59 f5 74 |....|...|~..r.Y.t|
|00005600| 12 58 ac d4 94 63 9e d1 | ce 28 d2 c9 ed 03 b1 21 |.X...c..|.(.....!|
|00005610| ff 25 00 00 70 77 39 df | 7e 7d 90 60 e9 c5 41 a0 |.%..pw9.|~}.`..A.|
|00005620| eb 43 20 7b d3 cf e7 cd | f8 f3 |.C {....|.. |
+--------+-------------------------+-------------------------+--------+--------+